[openeuler:OLK-6.6 1901/1901] drivers/net/ethernet/huawei/hinic/hinic_main.c:204:30: error: member reference type 'int' is not a pointer

Hi Zhou, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: be69fb5fc3212547e4408752b099094739f31aaa commit: 9c1c9598010fbb9daa1e2a67d23830092fb6246a [1901/1901] net/hinic: Update Huawei Intelligent Network Card Driver: hinic config: x86_64-buildonly-randconfig-001-20250208 (https://download.01.org/0day-ci/archive/20250208/202502080513.W05LfnyB-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/20250208/202502080513.W05LfnyB-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/202502080513.W05LfnyB-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/net/ethernet/huawei/hinic/hinic_main.c:18: In file included from include/linux/pci.h:1663: 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:2193: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ drivers/net/ethernet/huawei/hinic/hinic_main.c:204:9: error: call to undeclared function 'vlan_dev_priv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 204 | ret = vlan_dev_priv(ndev)->real_dev; | ^
drivers/net/ethernet/huawei/hinic/hinic_main.c:204:30: error: member reference type 'int' is not a pointer 204 | ret = vlan_dev_priv(ndev)->real_dev; | ~~~~~~~~~~~~~~~~~~~ ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:206:30: error: member reference type 'int' is not a pointer 206 | ret = vlan_dev_priv(ret)->real_dev; | ~~~~~~~~~~~~~~~~~~ ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:182:5: warning: no previous prototype for function 'hinic_netdev_event' [-Wmissing-prototypes] 182 | int hinic_netdev_event(struct notifier_block *notifier, | ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 182 | int hinic_netdev_event(struct notifier_block *notifier, | ^ | static drivers/net/ethernet/huawei/hinic/hinic_main.c:2291:21: error: no member named 'dcbnl_ops' in 'struct net_device' 2291 | adapter->netdev->dcbnl_ops = &hinic_dcbnl_ops; | ~~~~~~~~~~~~~~~ ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:3058:6: warning: no previous prototype for function 'nic_event' [-Wmissing-prototypes] 3058 | void nic_event(struct hinic_lld_dev *lld_dev, void *adapter, | ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:3058:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3058 | void nic_event(struct hinic_lld_dev *lld_dev, void *adapter, | ^ | static 3 warnings and 4 errors generated.
vim +/int +204 drivers/net/ethernet/huawei/hinic/hinic_main.c 176 177 #define HINIC_MAX_VLAN_DEPTH_OFFLOAD_SUPPORT 2 178 #define HINIC_VLAN_CLEAR_OFFLOAD (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \ 179 NETIF_F_SCTP_CRC | NETIF_F_RXCSUM | \ 180 NETIF_F_ALL_TSO) 181 182 int hinic_netdev_event(struct notifier_block *notifier, 183 unsigned long event, void *ptr) 184 { 185 struct net_device *ndev = netdev_notifier_info_to_dev(ptr); 186 struct net_device *real_dev, *ret; 187 struct hinic_nic_dev *nic_dev; 188 u16 vlan_depth; 189 190 if (!is_vlan_dev(ndev)) 191 return NOTIFY_DONE; 192 193 dev_hold(ndev); 194 195 switch (event) { 196 case NETDEV_REGISTER: 197 real_dev = vlan_dev_real_dev(ndev); 198 nic_dev = hinic_get_uld_dev_by_ifname(real_dev->name, 199 SERVICE_T_NIC); 200 if (!nic_dev) 201 goto out; 202 203 vlan_depth = 1;
204 ret = vlan_dev_priv(ndev)->real_dev; 205 while (is_vlan_dev(ret)) { 206 ret = vlan_dev_priv(ret)->real_dev; 207 vlan_depth++; 208 } 209 210 if (vlan_depth == HINIC_MAX_VLAN_DEPTH_OFFLOAD_SUPPORT) { 211 ndev->vlan_features &= (~HINIC_VLAN_CLEAR_OFFLOAD); 212 } else if (vlan_depth > HINIC_MAX_VLAN_DEPTH_OFFLOAD_SUPPORT) { 213 ndev->hw_features &= (~HINIC_VLAN_CLEAR_OFFLOAD); 214 ndev->features &= (~HINIC_VLAN_CLEAR_OFFLOAD); 215 } 216 217 break; 218 219 default: 220 break; 221 }; 222 223 out: 224 dev_put(ndev); 225 226 return NOTIFY_DONE; 227 } 228
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot