Re: [PATCH v7 2/2] PCI: dwc: Validate max-link-speed property
From: kernel test robot
Date: Sun Mar 08 2026 - 14:11:07 EST
Hi Hans,
kernel test robot noticed the following build errors:
[auto build test ERROR on c23719abc3308df7ed3ad35650ad211fb2d2003d]
url: https://github.com/intel-lab-lkp/linux/commits/Hans-Zhang/PCI-of-Remove-max-link-speed-generation-validation/20260308-223128
base: c23719abc3308df7ed3ad35650ad211fb2d2003d
patch link: https://lore.kernel.org/r/20260308142629.75392-3-18255117159%40163.com
patch subject: [PATCH v7 2/2] PCI: dwc: Validate max-link-speed property
config: csky-randconfig-r071-20260308 (https://download.01.org/0day-ci/archive/20260309/202603090252.S3qQ67Kh-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 10.5.0
smatch: v0.5.0-9004-gb810ac53
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260309/202603090252.S3qQ67Kh-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/202603090252.S3qQ67Kh-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:16,
from include/linux/clk.h:13,
from drivers/pci/controller/dwc/pcie-designware.c:13:
drivers/pci/controller/dwc/pcie-designware.c: In function 'dw_pcie_get_link_speed':
>> include/linux/array_size.h:11:32: error: invalid application of 'sizeof' to incomplete type 'const unsigned char[]'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
drivers/pci/controller/dwc/pcie-designware.c:128:19: note: in expansion of macro 'ARRAY_SIZE'
128 | max_speed >= ARRAY_SIZE(pcie_link_speed) ||
| ^~~~~~~~~~
vim +11 include/linux/array_size.h
3cd39bc3b11b8d Alejandro Colomar 2023-10-03 6
3cd39bc3b11b8d Alejandro Colomar 2023-10-03 7 /**
3cd39bc3b11b8d Alejandro Colomar 2023-10-03 8 * ARRAY_SIZE - get the number of elements in array @arr
3cd39bc3b11b8d Alejandro Colomar 2023-10-03 9 * @arr: array to be sized
3cd39bc3b11b8d Alejandro Colomar 2023-10-03 10 */
3cd39bc3b11b8d Alejandro Colomar 2023-10-03 @11 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
3cd39bc3b11b8d Alejandro Colomar 2023-10-03 12
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki