* drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2883:32: error: '%s' directive output may be truncated writing up to 31 bytes into a region of size 26
@ 2024-12-02 13:32 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-02 13:32 UTC (permalink / raw)
To: Vikas Gupta; +Cc: oe-kbuild-all, linux-kernel, Edwin Peer, Michael Chan
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e70140ba0d2b1a30467d4af6bcfe761327b9ec95
commit: 63185eb3aa267f2844580bbd8c9c1c97516f5dbb bnxt_en: Provide stored devlink "fw" version on older firmware
date: 3 years, 1 month ago
config: x86_64-rhel-9.4-nofixup (https://download.01.org/0day-ci/archive/20241202/202412022114.TqaFj4RR-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412022114.TqaFj4RR-lkp@intel.com/reproduce)
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/202412022114.TqaFj4RR-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c: In function 'bnxt_ethtool_init':
>> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2883:32: error: '%s' directive output may be truncated writing up to 31 bytes into a region of size 26 [-Werror=format-truncation=]
2883 | "/pkg %s", buf);
| ^~ ~~~
In function 'bnxt_get_pkgver',
inlined from 'bnxt_ethtool_init' at drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:3723:3:
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2882:17: note: 'snprintf' output between 6 and 37 bytes into a destination of size 31
2882 | snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2883 | "/pkg %s", buf);
| ~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +2883 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
2873
2874 static void bnxt_get_pkgver(struct net_device *dev)
2875 {
2876 struct bnxt *bp = netdev_priv(dev);
2877 char buf[FW_VER_STR_LEN];
2878 int len;
2879
2880 if (!bnxt_get_pkginfo(dev, buf, sizeof(buf))) {
2881 len = strlen(bp->fw_ver_str);
2882 snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len - 1,
> 2883 "/pkg %s", buf);
2884 }
2885 }
2886
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-02 13:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 13:32 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2883:32: error: '%s' directive output may be truncated writing up to 31 bytes into a region of size 26 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox