Skip to content

Commit 6ef00b4

Browse files
committed
pinctrl: nuvoton: Fix sparse warning
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. Reviewed-by: Jonathan Neuschäfer <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 042a636 commit 6ef00b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ static struct npcm7xx_func npcm7xx_funcs[] = {
895895
};
896896

897897
#define NPCM7XX_PINCFG(a, b, c, d, e, f, g, h, i, j, k) \
898-
[a] { .fn0 = fn_ ## b, .reg0 = NPCM7XX_GCR_ ## c, .bit0 = d, \
898+
[a] = { .fn0 = fn_ ## b, .reg0 = NPCM7XX_GCR_ ## c, .bit0 = d, \
899899
.fn1 = fn_ ## e, .reg1 = NPCM7XX_GCR_ ## f, .bit1 = g, \
900900
.fn2 = fn_ ## h, .reg2 = NPCM7XX_GCR_ ## i, .bit2 = j, \
901901
.flag = k }

drivers/pinctrl/nuvoton/pinctrl-wpcm450.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ static struct wpcm450_func wpcm450_funcs[] = {
613613
};
614614

615615
#define WPCM450_PINCFG(a, b, c, d, e, f, g) \
616-
[a] { .fn0 = fn_ ## b, .reg0 = WPCM450_GCR_ ## c, .bit0 = d, \
617-
.fn1 = fn_ ## e, .reg1 = WPCM450_GCR_ ## f, .bit1 = g }
616+
[a] = { .fn0 = fn_ ## b, .reg0 = WPCM450_GCR_ ## c, .bit0 = d, \
617+
.fn1 = fn_ ## e, .reg1 = WPCM450_GCR_ ## f, .bit1 = g }
618618

619619
struct wpcm450_pincfg {
620620
int fn0, reg0, bit0;

0 commit comments

Comments
 (0)