Skip to contentSkip to conversation

auxdisplay: Kconfig: drop unneeded quotes in PANEL_BOOT_MESSAGE dep

PATCH In review Stepan Ionichev 2 participants 3 messages May 15 – May 17 Auxiliary display drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 auxdisplay: Kconfig: drop unneeded quotes in PANEL_BOOT_MESSAGE dep

The PANEL_BOOT_MESSAGE dependency uses a quoted-string comparison against the PANEL_CHANGE_MESSAGE bool symbol:

depends on PANEL_CHANGE_MESSAGE="y"

This is the only such pattern under drivers/auxdisplay/ (grep shows no other Kconfig file in the tree uses depends on FOO="y" with quotes for a plain bool symbol). The quoted form is parsed by Kconfig but is not idiomatic; the common form for the same intent is the unquoted tristate-style dependency:

depends on PANEL_CHANGE_MESSAGE

which evaluates true when PANEL_CHANGE_MESSAGE is y or m. Since PANEL_CHANGE_MESSAGE is declared as bool (not tristate), there is no behaviour change in practice: y is the only enabled value either form can match.

Drop the quoted comparison so the dependency matches the prevailing kernel Kconfig style and so it is obvious to readers that the comparison works.

---
 drivers/auxdisplay/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/auxdisplay/Kconfig +1 -1
index bedc6133f..1ea7c0391 100644
@@ -327,7 +327,7 @@ config PANEL_CHANGE_MESSAGE
 	  say 'N' and keep the default message with the version.
 
 config PANEL_BOOT_MESSAGE
-	depends on PANEL_CHANGE_MESSAGE="y"
+	depends on PANEL_CHANGE_MESSAGE
 	string "New initialization message"
 	default ""
 	help
Signature · 1 line
2.43.0
#1 lore raw
Quoted 5 lines · Stepan Ionichev

The PANEL_BOOT_MESSAGE dependency uses a quoted-string comparison against the PANEL_CHANGE_MESSAGE bool symbol:

depends on PANEL_CHANGE_MESSAGE="y"

Quoted 7 lines

This is the only such pattern under drivers/auxdisplay/ (grep shows no other Kconfig file in the tree uses depends on FOO="y" with quotes for a plain bool symbol). The quoted form is parsed by Kconfig but is not idiomatic; the common form for the same intent is the unquoted tristate-style dependency:

depends on PANEL_CHANGE_MESSAGE

Strictly speaking we need to have =y in case if PANEL_CHANGE_MESSAGE becomes a tristate. But I don't believe it will ever happen IRL.

Quoted 8 lines

which evaluates true when PANEL_CHANGE_MESSAGE is y or m. Since PANEL_CHANGE_MESSAGE is declared as bool (not tristate), there is no behaviour change in practice: y is the only enabled value either form can match.

Drop the quoted comparison so the dependency matches the prevailing kernel Kconfig style and so it is obvious to readers that the comparison works.

Thanks, I'm going to apply this.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
In reply to Stepan Ionichev
Quoted 13 lines · Stepan Ionichev

The PANEL_BOOT_MESSAGE dependency uses a quoted-string comparison against the PANEL_CHANGE_MESSAGE bool symbol:

depends on PANEL_CHANGE_MESSAGE="y"

This is the only such pattern under drivers/auxdisplay/ (grep shows no other Kconfig file in the tree uses depends on FOO="y" with quotes for a plain bool symbol). The quoted form is parsed by Kconfig but is not idiomatic; the common form for the same intent is the unquoted tristate-style dependency:

depends on PANEL_CHANGE_MESSAGE

Quoted 8 lines

which evaluates true when PANEL_CHANGE_MESSAGE is y or m. Since PANEL_CHANGE_MESSAGE is declared as bool (not tristate), there is no behaviour change in practice: y is the only enabled value either form can match.

Drop the quoted comparison so the dependency matches the prevailing kernel Kconfig style and so it is obvious to readers that the comparison works.

Pushed to my review and testing queue, thanks!

Signature · 2 lines
With Best Regards,
Andy Shevchenko