Skip to contentSkip to conversation

linux-next: build warning after merge of the leds-lj tree

DISCUSSION Stephen Rothwell 4 participants 6 messages Jan 5, 2024 – Feb 9, 2024 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the leds-lj tree, today's linux-next build (htmldocs) produced this warning:

Warning: /sys/class/leds/<led>/rx is defined 2 times: Documentation/ABI/testing/sysfs-class-led-trigger-tty:7 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:49
Warning: /sys/class/leds/<led>/tx is defined 2 times: Documentation/ABI/testing/sysfs-class-led-trigger-tty:15 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:34

Introduced by commit

5b755ca677db ("leds: ledtrig-tty: Make rx tx activitate configurable")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hello Stephen,

thanks for your hint

Quoted 11 lines · Stephen Rothwell

Hi all,

After merging the leds-lj tree, today's linux-next build (htmldocs) produced this warning:

Warning: /sys/class/leds/<led>/rx is defined 2 times:
Documentation/ABI/testing/sysfs-class-led-trigger-tty:7 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:49
Warning: /sys/class/leds/<led>/tx is defined 2 times:
Documentation/ABI/testing/sysfs-class-led-trigger-tty:15 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:34

The behavior of the tty trigger can be controlled via the Rx and Tx file. If a value is set in Rx or Tx, the LED flashes when data is transmitted in this direction. The same behavior is used for the netdev trigger. I have therefore used the same pattern for the new tty trigger as well.

I didn't know that the names have to be unique!

I'm a bit at a loss as to what to do now. Should I put a prefix "tty_" in front of the names so that we have "tty_rx", "tty_tx"?

If we do it this way, however, the general question arises as to whether we do have to use a prefix everywhere! If new triggers are added, then the names for a config file are already used up and anyone who then wants to use the same name for an other trigger with the same config file because it describe the same function must then work with a prefix!

Best regards

Florian

#2 lore raw

Hi Florian,

Quoted 25 lines · On Mon, 08 Jan 2024 08:47:07 +0100 Florian Eckert <[email protected]> wrote:

Hello Stephen,

thanks for your hint

Quoted 11 lines · Stephen Rothwell

Hi all,

After merging the leds-lj tree, today's linux-next build (htmldocs) produced this warning:

Warning: /sys/class/leds/<led>/rx is defined 2 times:
Documentation/ABI/testing/sysfs-class-led-trigger-tty:7 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:49
Warning: /sys/class/leds/<led>/tx is defined 2 times:
Documentation/ABI/testing/sysfs-class-led-trigger-tty:15 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:34

The behavior of the tty trigger can be controlled via the Rx and Tx file. If a value is set in Rx or Tx, the LED flashes when data is transmitted in this direction. The same behavior is used for the netdev trigger. I have therefore used the same pattern for the new tty trigger as well.

I didn't know that the names have to be unique!

Quoted 8 lines

I'm a bit at a loss as to what to do now. Should I put a prefix "tty_" in front of the names so that we have "tty_rx", "tty_tx"?

If we do it this way, however, the general question arises as to whether we do have to use a prefix everywhere! If new triggers are added, then the names for a config file are already used up and anyone who then wants to use the same name for an other trigger with the same config file because it describe the same function must then work with a prefix!

I think this is only a problem with the documentation system, not the actual sysfs file naming. Maybe just adding a uniquifying bit to the "<led>" part will solve it. Or maybe we need the tooling to be taught about placeholders in sysfs names (or maybe there is already a way).

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw

Hi all,

Quoted 30 lines · On Tue, 9 Jan 2024 22:20:31 +1100 Stephen Rothwell <[email protected]> wrote:
Quoted 19 lines · On Mon, 08 Jan 2024 08:47:07 +0100 Florian Eckert <[email protected]> wrote:

thanks for your hint

Quoted 7 lines · Stephen Rothwell

Hi all,

After merging the leds-lj tree, today's linux-next build (htmldocs) produced this warning:

Warning: /sys/class/leds/<led>/rx is defined 2 times: Documentation/ABI/testing/sysfs-class-led-trigger-tty:7 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:49
Warning: /sys/class/leds/<led>/tx is defined 2 times: Documentation/ABI/testing/sysfs-class-led-trigger-tty:15 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:34

The behavior of the tty trigger can be controlled via the Rx and Tx file. If a value is set in Rx or Tx, the LED flashes when data is transmitted in this direction. The same behavior is used for the netdev trigger. I have therefore used the same pattern for the new tty trigger as well.

I didn't know that the names have to be unique!

Quoted 8 lines

I'm a bit at a loss as to what to do now. Should I put a prefix "tty_" in front of the names so that we have "tty_rx", "tty_tx"?

If we do it this way, however, the general question arises as to whether we do have to use a prefix everywhere! If new triggers are added, then the names for a config file are already used up and anyone who then wants to use the same name for an other trigger with the same config file because it describe the same function must then work with a prefix!

Quoted 4 lines

I think this is only a problem with the documentation system, not the actual sysfs file naming. Maybe just adding a uniquifying bit to the "<led>" part will solve it. Or maybe we need the tooling to be taught about placeholders in sysfs names (or maybe there is already a way).

I am still seeing these warnings.

Signature · 2 lines
Cheers,
Stephen Rothwell
#4 lore raw
In reply to Stephen Rothwell
Quoted 37 lines · Stephen Rothwell

Hi Florian,

Quoted 25 lines · On Mon, 08 Jan 2024 08:47:07 +0100 Florian Eckert <[email protected]> wrote:

Hello Stephen,

thanks for your hint

Quoted 11 lines · Stephen Rothwell

Hi all,

After merging the leds-lj tree, today's linux-next build (htmldocs) produced this warning:

Warning: /sys/class/leds/<led>/rx is defined 2 times:
Documentation/ABI/testing/sysfs-class-led-trigger-tty:7 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:49
Warning: /sys/class/leds/<led>/tx is defined 2 times:
Documentation/ABI/testing/sysfs-class-led-trigger-tty:15 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:34

The behavior of the tty trigger can be controlled via the Rx and Tx file. If a value is set in Rx or Tx, the LED flashes when data is transmitted in this direction. The same behavior is used for the netdev trigger. I have therefore used the same pattern for the new tty trigger as well.

I didn't know that the names have to be unique!

Quoted 8 lines

I'm a bit at a loss as to what to do now. Should I put a prefix "tty_" in front of the names so that we have "tty_rx", "tty_tx"?

If we do it this way, however, the general question arises as to whether we do have to use a prefix everywhere! If new triggers are added, then the names for a config file are already used up and anyone who then wants to use the same name for an other trigger with the same config file because it describe the same function must then work with a prefix!

Quoted 4 lines

I think this is only a problem with the documentation system, not the actual sysfs file naming. Maybe just adding a uniquifying bit to the "<led>" part will solve it. Or maybe we need the tooling to be taught about placeholders in sysfs names (or maybe there is already a way).

So I finally remembered to look at this when I had a chance to... yes, it wants each ABI entry to be unique, and the ones listed here are not. I *think* the easiest answer is to take a line like:

What: /sys/class/leds/<led>/rx

and turn it into something like:

What: /sys/class/leds/<netdev-led>/rx

...that makes the warning go away and, I think, conveys the information just as well. A bit kludgy, perhaps, but I don't really see anything else there that could be used to disambiguate the names automatically.

Thanks,

jon

#5 lore raw
Quoted 50 lines · Jonathan Corbet
Quoted 37 lines · Stephen Rothwell

Hi Florian,

Quoted 25 lines · On Mon, 08 Jan 2024 08:47:07 +0100 Florian Eckert <[email protected]> wrote:

Hello Stephen,

thanks for your hint

Quoted 11 lines · Stephen Rothwell

Hi all,

After merging the leds-lj tree, today's linux-next build (htmldocs) produced this warning:

Warning: /sys/class/leds/<led>/rx is defined 2 times:
Documentation/ABI/testing/sysfs-class-led-trigger-tty:7 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:49
Warning: /sys/class/leds/<led>/tx is defined 2 times:
Documentation/ABI/testing/sysfs-class-led-trigger-tty:15 Documentation/ABI/testing/sysfs-class-led-trigger-netdev:34

The behavior of the tty trigger can be controlled via the Rx and Tx file. If a value is set in Rx or Tx, the LED flashes when data is transmitted in this direction. The same behavior is used for the netdev trigger. I have therefore used the same pattern for the new tty trigger as well.

I didn't know that the names have to be unique!

Quoted 8 lines

I'm a bit at a loss as to what to do now. Should I put a prefix "tty_" in front of the names so that we have "tty_rx", "tty_tx"?

If we do it this way, however, the general question arises as to whether we do have to use a prefix everywhere! If new triggers are added, then the names for a config file are already used up and anyone who then wants to use the same name for an other trigger with the same config file because it describe the same function must then work with a prefix!

Quoted 4 lines

I think this is only a problem with the documentation system, not the actual sysfs file naming. Maybe just adding a uniquifying bit to the "<led>" part will solve it. Or maybe we need the tooling to be taught about placeholders in sysfs names (or maybe there is already a way).

So I finally remembered to look at this when I had a chance to... yes, it wants each ABI entry to be unique, and the ones listed here are not. I *think* the easiest answer is to take a line like:

What: /sys/class/leds/<led>/rx

Quoted 7 lines

and turn it into something like:

What: /sys/class/leds/<netdev-led>/rx

...that makes the warning go away and, I think, conveys the information just as well. A bit kludgy, perhaps, but I don't really see anything else there that could be used to disambiguate the names automatically.

Thanks Jon.

Please see:

https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git/commit/?h=for-leds-next&id=4694dcab92cf0e78ff65978888ae14a6373f1ceb

Signature · 1 line
Lee Jones [李琼斯]