tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 8a039651010897592567f5751c4e706ab794e9c0 commit: 69181c3c9413ccaa4dab458057d13efda520cb60 [1484/1484] Net: nebula_matrix: fix ci build warning config: x86_64-randconfig-001-20241119 (https://download.01.org/0day-ci/archive/20241119/202411190357.RZb9MYNL-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/20241119/202411190357.RZb9MYNL-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/202411190357.RZb9MYNL-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: In function 'nbl_get_drvinfo': drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:133:33: warning: variable 'priv' set but not used [-Wunused-but-set-variable] 133 | struct nbl_netdev_priv *priv; | ^~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: At top level: drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:308:6: warning: no previous prototype for 'nbl_serv_adjust_interrpt_param' [-Wmissing-prototypes] 308 | void nbl_serv_adjust_interrpt_param(struct nbl_service_mgt *serv_mgt, bool ethtool) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: In function 'nbl_serv_adjust_interrpt_param': drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:314:33: warning: variable 'net_priv' set but not used [-Wunused-but-set-variable] 314 | struct nbl_netdev_priv *net_priv; | ^~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: In function 'nbl_serv_update_stats': drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:365:33: warning: variable 'net_priv' set but not used [-Wunused-but-set-variable] 365 | struct nbl_netdev_priv *net_priv; | ^~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: At top level: drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:510:5: warning: no previous prototype for 'nbl_get_eeprom_length' [-Wmissing-prototypes] 510 | int nbl_get_eeprom_length(struct net_device *netdev) | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:515:5: warning: no previous prototype for 'nbl_get_eeprom' [-Wmissing-prototypes] 515 | int nbl_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, u8 *bytes) | ^~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: In function 'nbl_set_ksettings': drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:782:13: warning: variable 'autoneg' set but not used [-Wunused-but-set-variable] 782 | u32 autoneg = 0; | ^~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:779:30: warning: variable 'phy_caps' set but not used [-Wunused-but-set-variable] 779 | struct nbl_phy_caps *phy_caps; | ^~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:778:31: warning: variable 'phy_state' set but not used [-Wunused-but-set-variable] 778 | struct nbl_phy_state *phy_state; | ^~~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: In function 'nbl_set_pause_param': drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:1695:30: warning: variable 'phy_caps' set but not used [-Wunused-but-set-variable] 1695 | struct nbl_phy_caps *phy_caps; | ^~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:1694:31: warning: variable 'phy_state' set but not used [-Wunused-but-set-variable] 1694 | struct nbl_phy_state *phy_state; | ^~~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: In function 'nbl_get_fec_param': drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:1877:12: warning: variable 'autoneg' set but not used [-Wunused-but-set-variable] 1877 | u8 autoneg = 0; | ^~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c: In function 'nbl_stats_fill_strings': drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:170:47: warning: '%s' directive output may be truncated writing up to 1847 bytes into a region of size 32 [-Wformat-truncation=] 170 | snprintf(p, ETH_GSTRING_LEN, "%s", nbl_gstrings_stats[i].stat_string); | ^~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:170:17: note: 'snprintf' output between 1 and 1848 bytes into a destination of size 32 170 | snprintf(p, ETH_GSTRING_LEN, "%s", nbl_gstrings_stats[i].stat_string); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:181:58: warning: '_dvn_pkt_drop_cnt' directive output may be truncated writing 17 bytes into a region of size between 13 and 22 [-Wformat-truncation=]
181 | snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_dvn_pkt_drop_cnt", i); | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:181:17: note: 'snprintf' output between 28 and 37 bytes into a destination of size 32 181 | snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_dvn_pkt_drop_cnt", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:183:58: warning: '_tx_timeout_cnt' directive output may be truncated writing 15 bytes into a region of size between 13 and 22 [-Wformat-truncation=]
183 | snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_tx_timeout_cnt", i); | ^~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:183:17: note: 'snprintf' output between 26 and 35 bytes into a destination of size 32 183 | snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_tx_timeout_cnt", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:194:58: warning: '_uvn_stat_pkt_drop' directive output may be truncated writing 18 bytes into a region of size between 13 and 22 [-Wformat-truncation=]
194 | snprintf(p, ETH_GSTRING_LEN, "rx_queue_%u_uvn_stat_pkt_drop", i); | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c:194:17: note: 'snprintf' output between 29 and 38 bytes into a destination of size 32 194 | snprintf(p, ETH_GSTRING_LEN, "rx_queue_%u_uvn_stat_pkt_drop", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/_dvn_pkt_drop_cnt +181 drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_ethtool.c
bad535d287c9c1 Bennie Yan 2024-09-24 155 bad535d287c9c1 Bennie Yan 2024-09-24 156 static void nbl_stats_fill_strings(struct net_device *netdev, u8 *data) bad535d287c9c1 Bennie Yan 2024-09-24 157 { bad535d287c9c1 Bennie Yan 2024-09-24 158 struct nbl_adapter *adapter = NBL_NETDEV_TO_ADAPTER(netdev); bad535d287c9c1 Bennie Yan 2024-09-24 159 struct nbl_service_mgt *serv_mgt = NBL_ADAPTER_TO_SERV_MGT(adapter); bad535d287c9c1 Bennie Yan 2024-09-24 160 struct nbl_serv_ring_mgt *ring_mgt = NBL_SERV_MGT_TO_RING_MGT(serv_mgt); bad535d287c9c1 Bennie Yan 2024-09-24 161 struct nbl_dispatch_ops *disp_ops = NBL_SERV_MGT_TO_DISP_OPS(serv_mgt); bad535d287c9c1 Bennie Yan 2024-09-24 162 struct nbl_common_info *common = NBL_SERV_MGT_TO_COMMON(serv_mgt); bad535d287c9c1 Bennie Yan 2024-09-24 163 struct nbl_serv_ring_vsi_info *vsi_info; bad535d287c9c1 Bennie Yan 2024-09-24 164 char *p = (char *)data; bad535d287c9c1 Bennie Yan 2024-09-24 165 unsigned int i; bad535d287c9c1 Bennie Yan 2024-09-24 166 bad535d287c9c1 Bennie Yan 2024-09-24 167 vsi_info = &ring_mgt->vsi_info[NBL_VSI_DATA]; bad535d287c9c1 Bennie Yan 2024-09-24 168 bad535d287c9c1 Bennie Yan 2024-09-24 169 for (i = 0; i < NBL_GLOBAL_STATS_LEN; i++) { bad535d287c9c1 Bennie Yan 2024-09-24 170 snprintf(p, ETH_GSTRING_LEN, "%s", nbl_gstrings_stats[i].stat_string); bad535d287c9c1 Bennie Yan 2024-09-24 171 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 172 } bad535d287c9c1 Bennie Yan 2024-09-24 173 bad535d287c9c1 Bennie Yan 2024-09-24 174 for (i = 0; i < vsi_info->active_ring_num; i++) { bad535d287c9c1 Bennie Yan 2024-09-24 175 snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_packets", i); bad535d287c9c1 Bennie Yan 2024-09-24 176 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 177 snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_bytes", i); bad535d287c9c1 Bennie Yan 2024-09-24 178 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 179 snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_descs", i); bad535d287c9c1 Bennie Yan 2024-09-24 180 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 @181 snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_dvn_pkt_drop_cnt", i); bad535d287c9c1 Bennie Yan 2024-09-24 182 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 @183 snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_tx_timeout_cnt", i); bad535d287c9c1 Bennie Yan 2024-09-24 184 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 185 } bad535d287c9c1 Bennie Yan 2024-09-24 186 bad535d287c9c1 Bennie Yan 2024-09-24 187 for (i = 0; i < vsi_info->active_ring_num; i++) { bad535d287c9c1 Bennie Yan 2024-09-24 188 snprintf(p, ETH_GSTRING_LEN, "rx_queue_%u_packets", i); bad535d287c9c1 Bennie Yan 2024-09-24 189 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 190 snprintf(p, ETH_GSTRING_LEN, "rx_queue_%u_bytes", i); bad535d287c9c1 Bennie Yan 2024-09-24 191 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 192 snprintf(p, ETH_GSTRING_LEN, "rx_queue_%u_descs", i); bad535d287c9c1 Bennie Yan 2024-09-24 193 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 @194 snprintf(p, ETH_GSTRING_LEN, "rx_queue_%u_uvn_stat_pkt_drop", i); bad535d287c9c1 Bennie Yan 2024-09-24 195 p += ETH_GSTRING_LEN; bad535d287c9c1 Bennie Yan 2024-09-24 196 } bad535d287c9c1 Bennie Yan 2024-09-24 197 if (!common->is_vf) bad535d287c9c1 Bennie Yan 2024-09-24 198 disp_ops->fill_private_stat_strings(NBL_SERV_MGT_TO_DISP_PRIV(serv_mgt), p); bad535d287c9c1 Bennie Yan 2024-09-24 199 } bad535d287c9c1 Bennie Yan 2024-09-24 200
:::::: The code at line 181 was first introduced by commit :::::: bad535d287c9c1056d99de3666be7da84de4a8fc Net:nbl_core: Add nbl_core-driver for nebula-matrix S1055AS series smart NIC.
:::::: TO: Bennie Yan bennie.yan@nebula-matrix.com :::::: CC: Bennie Yan bennie.yan@nebula-matrix.com