* [PATCH] gpio: gpio-stmpe: Use str_hi_lo() helper in stmpe_dbg_show_one()
@ 2025-02-23 12:19 Salah Triki
2025-02-26 10:28 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Salah Triki @ 2025-02-23 12:19 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Maxime Coquelin,
Alexandre Torgue, linux-gpio, linux-stm32, linux-arm-kernel,
linux-kernel
Cc: Salah Triki
Remove hard-coded strings by using str_hi_lo() helper function.
Signed-off-by: Salah Triki <salah.triki@gmail.com>
---
drivers/gpio/gpio-stmpe.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 222279a9d82b..bd4122a6f670 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -15,7 +15,7 @@
#include <linux/platform_device.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
-
+#include <linux/string_choices.h>
/*
* These registers are modified under the irq bus lock and cached to avoid
* unnecessary writes in bus_sync_unlock.
@@ -283,7 +283,7 @@ static void stmpe_dbg_show_one(struct seq_file *s,
if (dir) {
seq_printf(s, " gpio-%-3d (%-20.20s) out %s",
gpio, label ?: "(none)",
- val ? "hi" : "lo");
+ str_hi_lo(val));
} else {
u8 edge_det_reg;
u8 rise_reg;
@@ -352,7 +352,7 @@ static void stmpe_dbg_show_one(struct seq_file *s,
seq_printf(s, " gpio-%-3d (%-20.20s) in %s %13s %13s %25s %25s",
gpio, label ?: "(none)",
- val ? "hi" : "lo",
+ str_hi_lo(val),
edge_det_values[edge_det],
irqen ? "IRQ-enabled" : "IRQ-disabled",
rise_values[rise],
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] gpio: gpio-stmpe: Use str_hi_lo() helper in stmpe_dbg_show_one()
2025-02-23 12:19 [PATCH] gpio: gpio-stmpe: Use str_hi_lo() helper in stmpe_dbg_show_one() Salah Triki
@ 2025-02-26 10:28 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-02-26 10:28 UTC (permalink / raw)
To: Salah Triki
Cc: Linus Walleij, Maxime Coquelin, Alexandre Torgue, linux-gpio,
linux-stm32, linux-arm-kernel, linux-kernel
On Sun, Feb 23, 2025 at 1:35 PM Salah Triki <salah.triki@gmail.com> wrote:
>
> Remove hard-coded strings by using str_hi_lo() helper function.
>
> Signed-off-by: Salah Triki <salah.triki@gmail.com>
> ---
This no longer applies, can you resend it rebased on top of current
gpio/for-next?
Bart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-26 10:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-23 12:19 [PATCH] gpio: gpio-stmpe: Use str_hi_lo() helper in stmpe_dbg_show_one() Salah Triki
2025-02-26 10:28 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®