* [PATCH v1 1/1] gpiolib: Even more opportunities to use str_high_low() helper
@ 2025-02-05 11:29 Andy Shevchenko
2025-02-11 8:45 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2025-02-05 11:29 UTC (permalink / raw)
To: Bartosz Golaszewski, linux-gpio, linux-kernel
Cc: Linus Walleij, Bartosz Golaszewski, Andy Shevchenko,
Krzysztof Kozlowski
The one of previous changes modified the library code to use
helpers from string_choices.h. Nevertheless it misses more
opportunities to convert the code. Here is the second part
of the conversion.
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpiolib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 2a58b84766f8..98fba0c392ea 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -4721,10 +4721,10 @@ int gpiod_hog(struct gpio_desc *desc, const char *name,
return ret;
}
- gpiod_dbg(desc, "hogged as %s%s\n",
+ gpiod_dbg(desc, "hogged as %s/%s\n",
(dflags & GPIOD_FLAGS_BIT_DIR_OUT) ? "output" : "input",
(dflags & GPIOD_FLAGS_BIT_DIR_OUT) ?
- (dflags & GPIOD_FLAGS_BIT_DIR_VAL) ? "/high" : "/low" : "");
+ str_high_low(dflags & GPIOD_FLAGS_BIT_DIR_VAL) : "?");
return 0;
}
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] gpiolib: Even more opportunities to use str_high_low() helper
2025-02-05 11:29 [PATCH v1 1/1] gpiolib: Even more opportunities to use str_high_low() helper Andy Shevchenko
@ 2025-02-11 8:45 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-02-11 8:45 UTC (permalink / raw)
To: linux-gpio, linux-kernel, Andy Shevchenko
Cc: Bartosz Golaszewski, Linus Walleij, Bartosz Golaszewski,
Krzysztof Kozlowski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Wed, 05 Feb 2025 13:29:36 +0200, Andy Shevchenko wrote:
> The one of previous changes modified the library code to use
> helpers from string_choices.h. Nevertheless it misses more
> opportunities to convert the code. Here is the second part
> of the conversion.
>
>
Applied, thanks!
[1/1] gpiolib: Even more opportunities to use str_high_low() helper
commit: 5f05e9194ada5609edbefb542c0dbfdbae984958
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-11 8:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 11:29 [PATCH v1 1/1] gpiolib: Even more opportunities to use str_high_low() helper Andy Shevchenko
2025-02-11 8:45 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).