drivers/pinctrl/pinctrl-rp1.c:343:39-40: WARNING: Use ARRAY_SIZE
From: kernel test robot
Date: Tue Nov 17 2026 - 01:52:56 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
commit: ce26f588c8310e0fdd1bc7524a86fdf0ef6b1c85 misc: rp1: drop overlay support
date: 11 months ago
config: arm64-randconfig-r2109-20261116 (https://download.01.org/0day-ci/archive/20261117/202611170729.LNqlHdfg-lkp@xxxxxxxxx/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 5637411ce5dc86d0b7f87cde0f7ee47406d29db6)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: ce26f588c831 ("misc: rp1: drop overlay support")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611170729.LNqlHdfg-lkp@xxxxxxxxx/
cocci warnings: (new ones prefixed by >>)
>> drivers/pinctrl/pinctrl-rp1.c:343:39-40: WARNING: Use ARRAY_SIZE
drivers/pinctrl/pinctrl-rp1.c:444:33-34: WARNING: Use ARRAY_SIZE
vim +343 drivers/pinctrl/pinctrl-rp1.c
e3ce7b89738833 Andrea della Porta 2025-06-24 339
e3ce7b89738833 Andrea della Porta 2025-06-24 340 #define PIN_ARRAY(...) \
e3ce7b89738833 Andrea della Porta 2025-06-24 341 (const unsigned int []) {__VA_ARGS__}
e3ce7b89738833 Andrea della Porta 2025-06-24 342 #define PIN_ARRAY_SIZE(...) \
e3ce7b89738833 Andrea della Porta 2025-06-24 @343 (sizeof((unsigned int[]) {__VA_ARGS__}) / sizeof(unsigned int))
e3ce7b89738833 Andrea della Porta 2025-06-24 344 #define RP1_GROUP(name, ...) \
e3ce7b89738833 Andrea della Porta 2025-06-24 345 PINCTRL_PINGROUP(#name, PIN_ARRAY(__VA_ARGS__), \
e3ce7b89738833 Andrea della Porta 2025-06-24 346 PIN_ARRAY_SIZE(__VA_ARGS__))
e3ce7b89738833 Andrea della Porta 2025-06-24 347
:::::: The code at line 343 was first introduced by commit
:::::: e3ce7b897388339b407d57969acaa26063e38209 pinctrl: rp1: Implement RaspberryPi RP1 pinmux/pinconf support
:::::: TO: Andrea della Porta <andrea.porta@xxxxxxxx>
:::::: CC: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki