mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:841:52: warning: '%s' directive output may be truncated writing up to 431 bytes into a region of size 28
Date: Sun, 12 Jan 2025 09:12:21 +0800	[thread overview]
Message-ID: <202501120912.Z88mEJSU-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b62cef9a5c673f1b8083159f5dc03c1c5daced2f
commit: 091810dbded96c2af81f645e386e4262553e3493 net: stmmac: Introduce selftests support
date:   6 years ago
config: x86_64-rhel-8.3-kunit (https://download.01.org/0day-ci/archive/20250112/202501120912.Z88mEJSU-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/20250112/202501120912.Z88mEJSU-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/202501120912.Z88mEJSU-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c: In function 'stmmac_selftest_get_strings':
>> drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:841:52: warning: '%s' directive output may be truncated writing up to 431 bytes into a region of size 28 [-Wformat-truncation=]
     841 |                 snprintf(p, ETH_GSTRING_LEN, "%2d. %s", i + 1,
         |                                                    ^~
   drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:841:17: note: 'snprintf' output between 5 and 436 bytes into a destination of size 32
     841 |                 snprintf(p, ETH_GSTRING_LEN, "%2d. %s", i + 1,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     842 |                          stmmac_selftests[i].name);
         |                          ~~~~~~~~~~~~~~~~~~~~~~~~~


vim +841 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c

   834	
   835	void stmmac_selftest_get_strings(struct stmmac_priv *priv, u8 *data)
   836	{
   837		u8 *p = data;
   838		int i;
   839	
   840		for (i = 0; i < stmmac_selftest_get_count(priv); i++) {
 > 841			snprintf(p, ETH_GSTRING_LEN, "%2d. %s", i + 1,
   842				 stmmac_selftests[i].name);
   843			p += ETH_GSTRING_LEN;
   844		}
   845	}
   846	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2025-01-12  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-12  1:12 kernel test robot [this message]
2025-02-09  6:49 kernel test robot

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=202501120912.Z88mEJSU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®