The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] pinctrl: pinctrl-rp1: Make use of str_hi_lo helper
@ 2026-07-05 16:01 Alex Tran
  2026-07-06 12:19 ` Andrea della Porta
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Tran @ 2026-07-05 16:01 UTC (permalink / raw)
  To: Andrea della Porta, Linus Walleij; +Cc: linux-gpio, linux-kernel, Alex Tran

Use the str_hi_lo helper API to print value
of a pin for debugging instead of using
ternary operator.

Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
---
 drivers/pinctrl/pinctrl-rp1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-rp1.c b/drivers/pinctrl/pinctrl-rp1.c
index fc4ed68ea5ac0bd272afe82076a36e93beba0539..dd0e85c2ca33a1ac506bf7ff0ceb424a7bde97d9 100644
--- a/drivers/pinctrl/pinctrl-rp1.c
+++ b/drivers/pinctrl/pinctrl-rp1.c
@@ -1085,7 +1085,7 @@ static void rp1_pctl_pin_dbg_show(struct pinctrl_dev *pctldev,
 
 	seq_printf(s, "function %s (%s) in %s; irq %d (%s)",
 		   rp1_func_names[fsel].name, rp1_func_names[func].name,
-		   value ? "hi" : "lo",
+		   str_hi_lo(value),
 		   irq, irq_type_names[pin->irq_type]);
 }
 

---
base-commit: 2b763db0c2763d6bf73d7d3e69665222d1f377cf
change-id: 20260704-rp1-str-hi-lo-cc64c3614be2

Best regards,
-- 
Alex Tran <alex.t.tran@gmail.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl: pinctrl-rp1: Make use of str_hi_lo helper
  2026-07-05 16:01 [PATCH] pinctrl: pinctrl-rp1: Make use of str_hi_lo helper Alex Tran
@ 2026-07-06 12:19 ` Andrea della Porta
  0 siblings, 0 replies; 2+ messages in thread
From: Andrea della Porta @ 2026-07-06 12:19 UTC (permalink / raw)
  To: Alex Tran; +Cc: Andrea della Porta, Linus Walleij, linux-gpio, linux-kernel

Hi Alex,

On 09:01 Sun 05 Jul     , Alex Tran wrote:
> Use the str_hi_lo helper API to print value
> of a pin for debugging instead of using
> ternary operator.
> 
> Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
> ---
>  drivers/pinctrl/pinctrl-rp1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-rp1.c b/drivers/pinctrl/pinctrl-rp1.c
> index fc4ed68ea5ac0bd272afe82076a36e93beba0539..dd0e85c2ca33a1ac506bf7ff0ceb424a7bde97d9 100644
> --- a/drivers/pinctrl/pinctrl-rp1.c
> +++ b/drivers/pinctrl/pinctrl-rp1.c
> @@ -1085,7 +1085,7 @@ static void rp1_pctl_pin_dbg_show(struct pinctrl_dev *pctldev,
>  
>  	seq_printf(s, "function %s (%s) in %s; irq %d (%s)",
>  		   rp1_func_names[fsel].name, rp1_func_names[func].name,
> -		   value ? "hi" : "lo",
> +		   str_hi_lo(value),
>  		   irq, irq_type_names[pin->irq_type]);
>  }
>  
> 
> ---
> base-commit: 2b763db0c2763d6bf73d7d3e69665222d1f377cf
> change-id: 20260704-rp1-str-hi-lo-cc64c3614be2
> 
> Best regards,
> -- 
> Alex Tran <alex.t.tran@gmail.com>
>

Thanks for your submission!

Reviewed-by: Andrea della Porta <andrea.porta@suse.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-06 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-05 16:01 [PATCH] pinctrl: pinctrl-rp1: Make use of str_hi_lo helper Alex Tran
2026-07-06 12:19 ` Andrea della Porta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox