drivers/leds/rgb/leds-qcom-lpg.c:177: warning: Excess struct member 'channels' description in 'lpg_led'

From: kernel test robot
Date: Fri Dec 15 2023 - 22:18:14 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3bd7d748816927202268cb335921f7f68b3ca723
commit: 0847c33bafe5b58f2f223153c007c1e185f84f48 leds: qcom-lpg: Annotate struct lpg_led with __counted_by
date: 6 weeks ago
config: arm-randconfig-r081-20231214 (https://download.01.org/0day-ci/archive/20231216/202312161115.HrJPGKhQ-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231216/202312161115.HrJPGKhQ-lkp@xxxxxxxxx/reproduce)

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
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312161115.HrJPGKhQ-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/leds/rgb/leds-qcom-lpg.c:177: warning: Excess struct member 'channels' description in 'lpg_led'


vim +177 drivers/leds/rgb/leds-qcom-lpg.c

24e2d05d1b68981 Bjorn Andersson 2022-03-03 160
24e2d05d1b68981 Bjorn Andersson 2022-03-03 161 /**
24e2d05d1b68981 Bjorn Andersson 2022-03-03 162 * struct lpg_led - logical LED object
24e2d05d1b68981 Bjorn Andersson 2022-03-03 163 * @lpg: lpg context reference
24e2d05d1b68981 Bjorn Andersson 2022-03-03 164 * @cdev: LED class device
24e2d05d1b68981 Bjorn Andersson 2022-03-03 165 * @mcdev: Multicolor LED class device
24e2d05d1b68981 Bjorn Andersson 2022-03-03 166 * @num_channels: number of @channels
24e2d05d1b68981 Bjorn Andersson 2022-03-03 167 * @channels: list of channels associated with the LED
24e2d05d1b68981 Bjorn Andersson 2022-03-03 168 */
24e2d05d1b68981 Bjorn Andersson 2022-03-03 169 struct lpg_led {
24e2d05d1b68981 Bjorn Andersson 2022-03-03 170 struct lpg *lpg;
24e2d05d1b68981 Bjorn Andersson 2022-03-03 171
24e2d05d1b68981 Bjorn Andersson 2022-03-03 172 struct led_classdev cdev;
24e2d05d1b68981 Bjorn Andersson 2022-03-03 173 struct led_classdev_mc mcdev;
24e2d05d1b68981 Bjorn Andersson 2022-03-03 174
24e2d05d1b68981 Bjorn Andersson 2022-03-03 175 unsigned int num_channels;
0847c33bafe5b58 Kees Cook 2023-09-15 176 struct lpg_channel *channels[] __counted_by(num_channels);
24e2d05d1b68981 Bjorn Andersson 2022-03-03 @177 };
24e2d05d1b68981 Bjorn Andersson 2022-03-03 178

:::::: The code at line 177 was first introduced by commit
:::::: 24e2d05d1b68981f22c984c766fabc5a93c83dba leds: Add driver for Qualcomm LPG

:::::: TO: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
:::::: CC: Pavel Machek <pavel@xxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki