[openeuler:OLK-6.6 2467/2467] drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:141:12: warning: 'ne6x_aq_get_vf_link_status' defined but not used

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: a9f7917e90ec872036160e2cb3a1d3c1856cb406 commit: a1d4d5a14d92c0c50418884e3bd132383989b67d [2467/2467] drivers: Fix BUILD REGRESSION warnings in bzwx N5/N6 series NIC drivers config: x86_64-randconfig-102-20250706 (https://download.01.org/0day-ci/archive/20250706/202507061805.cRYKvKJL-lkp@i...) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250706/202507061805.cRYKvKJL-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/202507061805.cRYKvKJL-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:2188:27: warning: initialized field overwritten [-Woverride-init] 2188 | .ndo_tx_timeout = ne6x_tx_timeout, | ^~~~~~~~~~~~~~~ drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:2188:27: note: (near initialization for 'ne6x_netdev_ops.ndo_tx_timeout') drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:2192:29: warning: initialized field overwritten [-Woverride-init] 2192 | .ndo_set_features = ne6x_set_features, | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:2192:29: note: (near initialization for 'ne6x_netdev_ops.ndo_set_features')
drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:141:12: warning: 'ne6x_aq_get_vf_link_status' defined but not used [-Wunused-function] 141 | static int ne6x_aq_get_vf_link_status(struct ne6x_adapter *adpt, bool is_up) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c: In function 'ne6x_config_netdev': drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:2353:43: warning: '%d' directive writing between 1 and 5 bytes into a region of size between 1 and 7 [-Wformat-overflow=] 2353 | sprintf(name, "enP%dp%ds0f%d", | ^~ drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:2353:31: note: directive argument in the range [0, 65535] 2353 | sprintf(name, "enP%dp%ds0f%d", | ^~~~~~~~~~~~~~~ drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c:2353:17: note: 'sprintf' output between 11 and 21 bytes into a destination of size 16 2353 | sprintf(name, "enP%dp%ds0f%d", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2354 | pf->hw.bus.domain_num, pf->hw.bus.bus_num, adpt->idx); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for ACPI_HOTPLUG_IGNORE_OSC Depends on [n]: ACPI [=y] && ACPI_HOTPLUG_CPU [=n] Selected by [y]: - X86 [=y] && ACPI [=y] && HOTPLUG_CPU [=y] vim +/ne6x_aq_get_vf_link_status +141 drivers/net/ethernet/bzwx/nce/ne6x/ne6x_main.c 140
141 static int ne6x_aq_get_vf_link_status(struct ne6x_adapter *adpt, bool is_up) 142 { 143 struct ne6x_pf *pf = adpt->back; 144 struct ne6x_adapter *pf_adpt = pf->adpt[(adpt->port_info->lport >= pf->hw.pf_port) ? 145 (pf->hw.pf_port - 1) : adpt->port_info->lport]; 146 struct ne6x_link_info *pf_link_status = &pf_adpt->port_info->link_status; 147 struct ne6x_port_info *vf_port_info = adpt->port_info; 148 149 if (is_up) { 150 if (pf_link_status->link) { 151 vf_port_info->phy.link_info.link_info |= NE6X_AQ_LINK_UP; 152 153 switch (pf_link_status->speed) { 154 case NE6X_LINK_SPEED_10GB: 155 vf_port_info->phy.link_info.phy_type_low = NE6X_PHY_TYPE_10GBASE; 156 vf_port_info->phy.link_info.link_speed = NE6X_LINK_SPEED_10GB; 157 break; 158 case NE6X_LINK_SPEED_25GB: 159 vf_port_info->phy.link_info.phy_type_low = NE6X_PHY_TYPE_25GBASE; 160 vf_port_info->phy.link_info.link_speed = NE6X_LINK_SPEED_25GB; 161 break; 162 case NE6X_LINK_SPEED_40GB: 163 vf_port_info->phy.link_info.phy_type_low = NE6X_PHY_TYPE_40GBASE; 164 vf_port_info->phy.link_info.link_speed = NE6X_LINK_SPEED_40GB; 165 break; 166 case NE6X_LINK_SPEED_100GB: 167 vf_port_info->phy.link_info.phy_type_low = NE6X_PHY_TYPE_100GBASE; 168 vf_port_info->phy.link_info.link_speed = NE6X_LINK_SPEED_100GB; 169 break; 170 case NE6X_LINK_SPEED_200GB: 171 vf_port_info->phy.link_info.phy_type_low = NE6X_PHY_TYPE_200GBASE; 172 vf_port_info->phy.link_info.link_speed = NE6X_LINK_SPEED_200GB; 173 break; 174 default: 175 dev_info(&adpt->back->pdev->dev, "WARNING: Unrecognized link_speed (0x%x).\n", 176 NE6X_LINK_SPEED_UNKNOWN); 177 break; 178 } 179 180 vf_port_info->phy.media_type = NE6X_MEDIA_FIBER; 181 return 0; 182 } 183 } 184 185 vf_port_info->phy.link_info.phy_type_low = NE6X_PHY_TYPE_UNKNOWN; 186 vf_port_info->phy.link_info.link_speed = NE6X_LINK_SPEED_UNKNOWN; 187 vf_port_info->phy.media_type = NE6X_MEDIA_UNKNOWN; 188 vf_port_info->phy.link_info.link_info &= ~NE6X_AQ_LINK_UP; 189 190 return 0; 191 } 192
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot