Re: [PATCH v4 1/2] PCI: dwc: Add support for vendor specific capability search

From: kernel test robot
Date: Fri Dec 06 2024 - 07:58:28 EST


Hi Shradha,

kernel test robot noticed the following build warnings:

[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus mani-mhi/mhi-next linus/master v6.13-rc1 next-20241205]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Shradha-Todi/PCI-dwc-Add-support-for-vendor-specific-capability-search/20241206-163620
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20241206074456.17401-2-shradha.t%40samsung.com
patch subject: [PATCH v4 1/2] PCI: dwc: Add support for vendor specific capability search
config: arm64-randconfig-003-20241206 (https://download.01.org/0day-ci/archive/20241206/202412062046.0XR2e2V6-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241206/202412062046.0XR2e2V6-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/202412062046.0XR2e2V6-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from drivers/pci/controller/dwc/pcie-designware.c:15:
In file included from include/linux/dma/edma.h:13:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/controller/dwc/pcie-designware.c:285:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
285 | while (vsec = dw_pcie_find_next_ext_capability(pci, vsec,
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
286 | PCI_EXT_CAP_ID_VNDR)) {
| ~~~~~~~~~~~~~~~~~~~~
drivers/pci/controller/dwc/pcie-designware.c:285:14: note: place parentheses around the assignment to silence this warning
285 | while (vsec = dw_pcie_find_next_ext_capability(pci, vsec,
| ^
| (
286 | PCI_EXT_CAP_ID_VNDR)) {
|
| )
drivers/pci/controller/dwc/pcie-designware.c:285:14: note: use '==' to turn this assignment into an equality comparison
285 | while (vsec = dw_pcie_find_next_ext_capability(pci, vsec,
| ^
| ==
5 warnings generated.


vim +285 drivers/pci/controller/dwc/pcie-designware.c

279
280 u16 dw_pcie_find_vsec_capability(struct dw_pcie *pci, u8 vsec_cap)
281 {
282 u16 vsec = 0;
283 u32 header;
284
> 285 while (vsec = dw_pcie_find_next_ext_capability(pci, vsec,
286 PCI_EXT_CAP_ID_VNDR)) {
287 header = dw_pcie_readl_dbi(pci, vsec + PCI_VNDR_HEADER);
288 if (PCI_VNDR_HEADER_ID(header) == vsec_cap)
289 return vsec;
290 }
291
292 return 0;
293 }
294 EXPORT_SYMBOL_GPL(dw_pcie_find_vsec_capability);
295

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