Hi Fengyan,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 412556141b3c12f2f160acc3a09a40c937837ee3 commit: 737ec46e963210dc3b856637e871fa5b0c91316e [19377/30000] UNIC: Adds the process of UNIC driver initializing config: arm64-defconfig (https://download.01.org/0day-ci/archive/20241027/202410271746.Yz3z91T2-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271746.Yz3z91T2-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/202410271746.Yz3z91T2-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c:2104:33: warning: 'hns3_unic_ethtool_ops' defined but not used [-Wunused-const-variable=]
2104 | static const struct ethtool_ops hns3_unic_ethtool_ops = { | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c: In function 'hns3_get_strings': drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c:588:58: warning: '%s' directive output may be truncated writing up to 119 bytes into a region of size 32 [-Wformat-truncation=] 588 | snprintf(buff, ETH_GSTRING_LEN, "%s", | ^~ drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c:588:25: note: 'snprintf' output between 1 and 120 bytes into a destination of size 32 588 | snprintf(buff, ETH_GSTRING_LEN, "%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 589 | hns3_priv_flags[i].name); | ~~~~~~~~~~~~~~~~~~~~~~~~
vim +/hns3_unic_ethtool_ops +2104 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
2103
2104 static const struct ethtool_ops hns3_unic_ethtool_ops = {
2105 .supported_coalesce_params = HNS3_ETHTOOL_COALESCE, 2106 .supported_ring_params = HNS3_ETHTOOL_RING, 2107 .self_test = hns3_self_test, 2108 .get_drvinfo = hns3_get_drvinfo, 2109 .get_link = hns3_get_link, 2110 .get_ringparam = hns3_get_ringparam, 2111 .set_ringparam = hns3_set_ringparam, 2112 .get_strings = hns3_get_strings, 2113 .get_ethtool_stats = hns3_get_stats, 2114 .get_sset_count = hns3_get_sset_count, 2115 .get_channels = hns3_get_channels, 2116 .set_channels = hns3_set_channels, 2117 .get_rxnfc = hns3_get_rxnfc, 2118 .set_rxnfc = hns3_set_rxnfc, 2119 .get_rxfh_key_size = hns3_get_rss_key_size, 2120 .get_rxfh_indir_size = hns3_get_rss_indir_size, 2121 .get_rxfh = hns3_get_rss, 2122 .set_rxfh = hns3_set_rss, 2123 .get_link_ksettings = hns3_get_link_ksettings, 2124 .set_link_ksettings = hns3_set_link_ksettings, 2125 .nway_reset = hns3_nway_reset, 2126 .get_coalesce = hns3_get_coalesce, 2127 .set_coalesce = hns3_set_coalesce, 2128 .get_regs_len = hns3_get_regs_len, 2129 .get_regs = hns3_get_regs, 2130 .set_phys_id = hns3_set_phys_id, 2131 .get_msglevel = hns3_get_msglevel, 2132 .set_msglevel = hns3_set_msglevel, 2133 .get_fecparam = hns3_get_fecparam, 2134 .set_fecparam = hns3_set_fecparam, 2135 .get_module_info = hns3_get_module_info, 2136 .get_module_eeprom = hns3_get_module_eeprom, 2137 .get_priv_flags = hns3_get_priv_flags, 2138 .set_priv_flags = hns3_set_priv_flags, 2139 .get_ts_info = hns3_get_ts_info, 2140 .get_tunable = hns3_get_tunable, 2141 .set_tunable = hns3_set_tunable, 2142 .reset = hns3_set_reset, 2143 .get_link_ext_state = hns3_get_link_ext_state, 2144 }; 2145