From: kernel test robot <lkp@intel.com>
To: Vikas Gupta <vikas.gupta@broadcom.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Edwin Peer <edwin.peer@broadcom.com>,
Michael Chan <michael.chan@broadcom.com>
Subject: 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
Date: Mon, 2 Dec 2024 21:32:13 +0800 [thread overview]
Message-ID: <202412022114.TqaFj4RR-lkp@intel.com> (raw)
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
reply other threads:[~2024-12-02 13:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202412022114.TqaFj4RR-lkp@intel.com \
--to=lkp@intel.com \
--cc=edwin.peer@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=vikas.gupta@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox