tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 929a9df37c1b7dec73fd417d79a116d02a8f9380 commit: d48b7d951d22f7f97d68ae7b580769827683d404 [2516/2516] drivers: initial support for xsc drivers from Yunsilicon Technology config: x86_64-randconfig-r063-20241203 (https://download.01.org/0day-ci/archive/20241203/202412030645.2p5xOIF3-lkp@i...) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241203/202412030645.2p5xOIF3-lkp@i...)
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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202412030645.2p5xOIF3-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/yunsilicon/xsc/pci/sriov.c:7: In file included from include/linux/pci.h:1499: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:1579: include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 418 | item]; | ~~~~ include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 425 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 437 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 446 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/yunsilicon/xsc/pci/sriov.c:8: In file included from drivers/net/ethernet/yunsilicon/xsc/common/xsc_core.h:24: In file included from drivers/net/ethernet/yunsilicon/xsc/common/driver.h:21: drivers/net/ethernet/yunsilicon/xsc/common/xsc_hsi.h:598:46: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare] 598 | } else if (func_id >= XSC_PCIE1_PF0_FUNC_ID && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 599 | func_id <= XSC_PCIE1_PF_FUNC_ID_END) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/yunsilicon/xsc/pci/sriov.c:12: In file included from drivers/net/ethernet/yunsilicon/xsc/pci/eswitch.h:15: include/net/devlink.h:28:19: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion] 28 | u32 reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE' 25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX) | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/net/devlink.h:29:26: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion] 29 | u32 remote_reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE' 25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX) | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/yunsilicon/xsc/pci/sriov.c:167:35: error: no member named 'physfn' in 'struct pci_dev'
167 | pf_xdev = pci_get_drvdata(pdev->physfn); | ~~~~ ^ 8 warnings and 1 error generated.
vim +167 drivers/net/ethernet/yunsilicon/xsc/pci/sriov.c
159 160 int xsc_sriov_attach(struct xsc_core_device *dev) 161 { 162 struct pci_dev *pdev = dev->pdev; 163 struct xsc_core_device *pf_xdev; 164 struct xsc_core_sriov *sriov; 165 166 if (!xsc_core_is_pf(dev)) {
167 pf_xdev = pci_get_drvdata(pdev->physfn);
168 sriov = &pf_xdev->priv.sriov; 169 170 sriov->vfs[dev->vf_id].vf = dev->vf_id; 171 sriov->vfs[dev->vf_id].dev = dev; 172 return 0; 173 } 174 175 if (!dev->priv.sriov.num_vfs) 176 return 0; 177 178 /* If sriov VFs exist in PCI level, enable them in device level */ 179 return xsc_device_enable_sriov(dev, pci_num_vf(dev->pdev)); 180 } 181