]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: npcm8xx: Fix incorrect struct npcm8xx_pincfg assignment
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 18 Mar 2025 10:57:14 +0000 (12:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:20 +0000 (14:39 +0200)
commit4409e87cdc8b068c29a71db9fee43f024c8ee3bd
tree3e1141ca38c4bdf96414034b9ea7a348a2a25a71
parent8ba426f170f1c7f28875d93a8374d7049d13946a
pinctrl: npcm8xx: Fix incorrect struct npcm8xx_pincfg assignment

[ Upstream commit 113ec87b0f26a17b02c58aa2714a9b8f1020eed9 ]

Sparse is not happy about implementation of the NPCM8XX_PINCFG()

 pinctrl-npcm8xx.c:1314:9: warning: obsolete array initializer, use C99 syntax
 pinctrl-npcm8xx.c:1315:9: warning: obsolete array initializer, use C99 syntax
 ...
 pinctrl-npcm8xx.c:1412:9: warning: obsolete array initializer, use C99 syntax
 pinctrl-npcm8xx.c:1413:9: warning: too many warnings

which uses index-based assignment in a wrong way, i.e. it missed
the equal sign and hence the index is simply ignored, while the
entries are indexed naturally. This is not a problem as the pin
numbering repeats the natural order, but it might be in case of
shuffling the entries. Fix this by adding missed equal sign and
reformat a bit for better readability.

Fixes: acf4884a5717 ("pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/20250318105932.2090926-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c