Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH] pinctrl: nuvoton: Fix sparse warning
@ 2022-03-22 23:16 Linus Walleij
  2022-03-23  1:58 ` Jonathan Neuschäfer
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2022-03-22 23:16 UTC (permalink / raw)
  To: linux-gpio; +Cc: Linus Walleij, Jonathan Neuschäfer, kernel test robot

Sparse complains:
drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:626:9:
sparse: sparse: obsolete array initializer, use C99 syntax

This is because no equal sign is between the array index
and the assignments, in the macro.

Fix it up.

Cc: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
index 661aa963e3fc..1402840af11f 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
@@ -613,8 +613,8 @@ static struct wpcm450_func wpcm450_funcs[] = {
 };
 
 #define WPCM450_PINCFG(a, b, c, d, e, f, g) \
-	[a] { .fn0 = fn_ ## b, .reg0 = WPCM450_GCR_ ## c, .bit0 = d, \
-	      .fn1 = fn_ ## e, .reg1 = WPCM450_GCR_ ## f, .bit1 = g }
+	[a] = { .fn0 = fn_ ## b, .reg0 = WPCM450_GCR_ ## c, .bit0 = d, \
+	        .fn1 = fn_ ## e, .reg1 = WPCM450_GCR_ ## f, .bit1 = g }
 
 struct wpcm450_pincfg {
 	int fn0, reg0, bit0;
-- 
2.35.1


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

end of thread, other threads:[~2022-03-23  1:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-22 23:16 [PATCH] pinctrl: nuvoton: Fix sparse warning Linus Walleij
2022-03-23  1:58 ` Jonathan Neuschäfer

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