linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: spacemit: remove extra line in debug output
@ 2025-08-05 15:07 Hendrik Hamerlinck
  2025-08-05 22:41 ` Yixun Lan
  2025-08-18 15:17 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Hendrik Hamerlinck @ 2025-08-05 15:07 UTC (permalink / raw)
  To: linus.walleij, dlan
  Cc: skhan, linux-kernel-mentees, linux-gpio, linux-riscv, spacemit,
	linux-kernel, Hendrik Hamerlinck

The debug output for spacemit_pinconf_dbg_show() prints an extra newline
at the end. This is redundant as pinconf_pins_show() in pinconf.c already
adds a newline in its for loop.

Remove the newline to avoid the extra line in the output.

Example current output:
$ cat /sys/kernel/debug/pinctrl/d401e000.pinctrl/pinconf-pins
Pin config settings per pin
Format: pin (name): configs
pin 0 (GPIO_00): , bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)

pin 1 (GPIO_01): slew rate (0x0), bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)

pin 2 (GPIO_02): slew rate (0x0), bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)

...

Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
---
 drivers/pinctrl/spacemit/pinctrl-k1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/spacemit/pinctrl-k1.c b/drivers/pinctrl/spacemit/pinctrl-k1.c
index 9996b1c4a07e..fb361f2acb54 100644
--- a/drivers/pinctrl/spacemit/pinctrl-k1.c
+++ b/drivers/pinctrl/spacemit/pinctrl-k1.c
@@ -707,7 +707,7 @@ static void spacemit_pinconf_dbg_show(struct pinctrl_dev *pctldev,
 			   spacemit_get_drive_strength_mA(IO_TYPE_1V8, tmp),
 			   spacemit_get_drive_strength_mA(IO_TYPE_3V3, tmp));
 
-	seq_printf(seq, ", register (0x%04x)\n", value);
+	seq_printf(seq, ", register (0x%04x)", value);
 }
 
 static const struct pinconf_ops spacemit_pinconf_ops = {
-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] pinctrl: spacemit: remove extra line in debug output
  2025-08-05 15:07 [PATCH] pinctrl: spacemit: remove extra line in debug output Hendrik Hamerlinck
@ 2025-08-05 22:41 ` Yixun Lan
  2025-08-18 15:17 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2025-08-05 22:41 UTC (permalink / raw)
  To: Hendrik Hamerlinck
  Cc: linus.walleij, skhan, linux-kernel-mentees, linux-gpio,
	linux-riscv, spacemit, linux-kernel

Hi Hendrik, 
On 17:07 Tue 05 Aug     , Hendrik Hamerlinck wrote:
> The debug output for spacemit_pinconf_dbg_show() prints an extra newline
> at the end. This is redundant as pinconf_pins_show() in pinconf.c already
> adds a newline in its for loop.
> 
> Remove the newline to avoid the extra line in the output.
> 
> Example current output:
> $ cat /sys/kernel/debug/pinctrl/d401e000.pinctrl/pinconf-pins
> Pin config settings per pin
> Format: pin (name): configs
> pin 0 (GPIO_00): , bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)
> 
> pin 1 (GPIO_01): slew rate (0x0), bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)
> 
> pin 2 (GPIO_02): slew rate (0x0), bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)
> 
> ...
> 
> Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
Reviewed-by: Yixun Lan <dlan@gentoo.org>
> ---
>  drivers/pinctrl/spacemit/pinctrl-k1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/spacemit/pinctrl-k1.c b/drivers/pinctrl/spacemit/pinctrl-k1.c
> index 9996b1c4a07e..fb361f2acb54 100644
> --- a/drivers/pinctrl/spacemit/pinctrl-k1.c
> +++ b/drivers/pinctrl/spacemit/pinctrl-k1.c
> @@ -707,7 +707,7 @@ static void spacemit_pinconf_dbg_show(struct pinctrl_dev *pctldev,
>  			   spacemit_get_drive_strength_mA(IO_TYPE_1V8, tmp),
>  			   spacemit_get_drive_strength_mA(IO_TYPE_3V3, tmp));
>  
> -	seq_printf(seq, ", register (0x%04x)\n", value);
> +	seq_printf(seq, ", register (0x%04x)", value);
>  }
>  
>  static const struct pinconf_ops spacemit_pinconf_ops = {
> -- 
> 2.43.0
> 

-- 
Yixun Lan (dlan)

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] pinctrl: spacemit: remove extra line in debug output
  2025-08-05 15:07 [PATCH] pinctrl: spacemit: remove extra line in debug output Hendrik Hamerlinck
  2025-08-05 22:41 ` Yixun Lan
@ 2025-08-18 15:17 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2025-08-18 15:17 UTC (permalink / raw)
  To: Hendrik Hamerlinck
  Cc: dlan, skhan, linux-kernel-mentees, linux-gpio, linux-riscv,
	spacemit, linux-kernel

On Tue, Aug 5, 2025 at 5:08 PM Hendrik Hamerlinck
<hendrik.hamerlinck@hammernet.be> wrote:

> The debug output for spacemit_pinconf_dbg_show() prints an extra newline
> at the end. This is redundant as pinconf_pins_show() in pinconf.c already
> adds a newline in its for loop.
>
> Remove the newline to avoid the extra line in the output.
>
> Example current output:
> $ cat /sys/kernel/debug/pinctrl/d401e000.pinctrl/pinconf-pins
> Pin config settings per pin
> Format: pin (name): configs
> pin 0 (GPIO_00): , bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)
>
> pin 1 (GPIO_01): slew rate (0x0), bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)
>
> pin 2 (GPIO_02): slew rate (0x0), bias pull disabled, io type (Fixed/1V8), drive strength (32 mA), register (0x1041)
>
> ...
>
> Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>

Patch applied!

Yours,
Linus Walleij

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2025-08-18 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 15:07 [PATCH] pinctrl: spacemit: remove extra line in debug output Hendrik Hamerlinck
2025-08-05 22:41 ` Yixun Lan
2025-08-18 15:17 ` Linus Walleij

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).