* [PATCH] sonypi: Use str_on_off() helper in sonypi_display_info()
@ 2025-02-10 12:31 Thorsten Blum
2025-02-13 13:45 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-02-10 12:31 UTC (permalink / raw)
To: Mattia Dongili, Arnd Bergmann, Greg Kroah-Hartman
Cc: Thorsten Blum, platform-driver-x86, linux-kernel
Remove hard-coded strings by using the str_on_off() helper function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/char/sonypi.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index f887569fd3d0..677bb5ac950a 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -37,6 +37,7 @@
#include <linux/kfifo.h>
#include <linux/platform_device.h>
#include <linux/gfp.h>
+#include <linux/string_choices.h>
#include <linux/uaccess.h>
#include <asm/io.h>
@@ -1268,12 +1269,12 @@ static void sonypi_display_info(void)
"compat = %s, mask = 0x%08lx, useinput = %s, acpi = %s\n",
sonypi_device.model,
verbose,
- fnkeyinit ? "on" : "off",
- camera ? "on" : "off",
- compat ? "on" : "off",
+ str_on_off(fnkeyinit),
+ str_on_off(camera),
+ str_on_off(compat),
mask,
- useinput ? "on" : "off",
- SONYPI_ACPI_ACTIVE ? "on" : "off");
+ str_on_off(useinput),
+ str_on_off(SONYPI_ACPI_ACTIVE));
printk(KERN_INFO "sonypi: enabled at irq=%d, port1=0x%x, port2=0x%x\n",
sonypi_device.irq,
sonypi_device.ioport1, sonypi_device.ioport2);
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sonypi: Use str_on_off() helper in sonypi_display_info()
2025-02-10 12:31 [PATCH] sonypi: Use str_on_off() helper in sonypi_display_info() Thorsten Blum
@ 2025-02-13 13:45 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2025-02-13 13:45 UTC (permalink / raw)
To: Mattia Dongili, Arnd Bergmann, Greg Kroah-Hartman, Thorsten Blum
Cc: platform-driver-x86, linux-kernel
On Mon, 10 Feb 2025 13:31:03 +0100, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_on_off() helper function.
>
>
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] sonypi: Use str_on_off() helper in sonypi_display_info()
commit: 9cf1c75bfda5168b82ba19576267d5cad0327b9f
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-13 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 12:31 [PATCH] sonypi: Use str_on_off() helper in sonypi_display_info() Thorsten Blum
2025-02-13 13:45 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox