pinctrl: stm32: fix debugfs format string
Subsystems (4)
PATCH 1/1 pinctrl: stm32: fix debugfs format string
The newly added stm32_pconf_dbg_show function has an incorrect format string that does not match the arguments, as reported by the gcc warning:
drivers/pinctrl/stm32/pinctrl-stm32.c: In function 'stm32_pconf_dbg_show':drivers/pinctrl/stm32/pinctrl-stm32.c:797:17: error: too many arguments for format [-Werror=format-extra-args]
This changes the format string in a way that gets rid of the warning.
---
I could not find a documentation for the debugfs format, so no idea if this is the intended format.
--- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/stm32/pinctrl-stm32.c +1 -1
@@ -794,7 +794,7 @@ static void stm32_pconf_dbg_show(struct pinctrl_dev *pctldev,case 2 : drive =stm32_pconf_get_driving (bank, offset); speed =stm32_pconf_get_speed (bank, offset); -seq_printf (s,"%d - %s -%s" , alt, +seq_printf (s,"%d - %s - %s - %s %s " , alt, drive ?"open drain" :"push pull" , biasing[bias], speeds[speed],"speed" );
Signature · 1 line
2.7.0
Hi Arnd
I have already send a fix for this on the mailing list on 12th may ([PATCH 0/2] pinctrl: stm32: .pin_config_dbg_show fixes). I don't know if Linus will merged it on his pinctrl branch.
Sorry
Patrice
Quoted 30 lines · Arnd Bergmann
The newly added
stm32_pconf_dbg_showfunction has an incorrect format string that does not match the arguments, as reported by the gcc warning:
drivers/pinctrl/stm32/pinctrl-stm32.c: In function 'stm32_pconf_dbg_show':drivers/pinctrl/stm32/pinctrl-stm32.c:797:17: error: too many arguments for format [-Werror=format-extra-args]This changes the format string in a way that gets rid of the warning.
Signed-off-by Arnd Bergmann <[email protected]>Fixes 3beed93c1617 ("pinctrl: stm32: Implement .pin_config_dbg_show()")---
I could not find a documentation for the debugfs format, so no idea if this is the intended format.--- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/stm32/pinctrl-stm32.c +1
-1@@ -794,7 +794,7 @@ static void stm32_pconf_dbg_show(struct pinctrl_dev *pctldev,case 2 : drive =stm32_pconf_get_driving (bank, offset); speed =stm32_pconf_get_speed (bank, offset); -seq_printf (s,"%d - %s -%s" , alt, +seq_printf (s,"%d - %s - %s - %s %s " , alt, drive ?"open drain" :"push pull" , biasing[bias], speeds[speed],"speed" );