* [PATCH] pinctrl: starfive: jhb100: use str_enable_disable()
@ 2026-11-04 15:00 Aryan Sinha
2026-11-05 0:58 ` Changhuang Liang
0 siblings, 1 reply; 2+ messages in thread
From: Aryan Sinha @ 2026-11-04 15:00 UTC (permalink / raw)
To: Changhuang Liang, Lianfeng Ouyang
Cc: Linus Walleij, linux-gpio, linux-kernel, Aryan Sinha
Replace the open coded ternary in the jhb100_irq_set_wake() function with the helper
from string_choices.h. Gives same output.
Signed-off-by: Aryan Sinha <sinha.aryan03@gmail.com>
---
drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
index 462a26697..329153876 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
@@ -20,6 +20,7 @@
#include <linux/seq_file.h>
#include <linux/spinlock.h>
#include <linux/string.h>
+#include <linux/string_choices.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinconf.h>
@@ -1152,7 +1153,7 @@ static int jhb100_irq_set_wake(struct irq_data *d, unsigned int enable)
ret = disable_irq_wake(sfp->irq);
if (ret)
dev_err(sfp->dev, "failed to %s wake-up interrupt\n",
- enable ? "enable" : "disable");
+ str_enable_disable(enable));
return ret;
}
--
2.46.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: starfive: jhb100: use str_enable_disable()
2026-11-04 15:00 [PATCH] pinctrl: starfive: jhb100: use str_enable_disable() Aryan Sinha
@ 2026-11-05 0:58 ` Changhuang Liang
0 siblings, 0 replies; 2+ messages in thread
From: Changhuang Liang @ 2026-11-05 0:58 UTC (permalink / raw)
To: Aryan Sinha, Lianfeng Ouyang; +Cc: Linus Walleij, linux-gpio, linux-kernel
> Replace the open coded ternary in the jhb100_irq_set_wake() function with
> the helper from string_choices.h. Gives same output.
>
> Signed-off-by: Aryan Sinha <sinha.aryan03@gmail.com>
Reviewed-by: Changhuang Liang <changhuang.liang@starfivetech.com>
Best Regards,
Changhuang
> ---
> drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
> b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
> index 462a26697..329153876 100644
> --- a/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
> +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
> @@ -20,6 +20,7 @@
> #include <linux/seq_file.h>
> #include <linux/spinlock.h>
> #include <linux/string.h>
> +#include <linux/string_choices.h>
>
> #include <linux/pinctrl/consumer.h>
> #include <linux/pinctrl/pinconf.h>
> @@ -1152,7 +1153,7 @@ static int jhb100_irq_set_wake(struct irq_data *d,
> unsigned int enable)
> ret = disable_irq_wake(sfp->irq);
> if (ret)
> dev_err(sfp->dev, "failed to %s wake-up interrupt\n",
> - enable ? "enable" : "disable");
> + str_enable_disable(enable));
>
> return ret;
> }
> --
> 2.46.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-05 0:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 15:00 [PATCH] pinctrl: starfive: jhb100: use str_enable_disable() Aryan Sinha
2026-11-05 0:58 ` Changhuang Liang
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®