From: kernel test robot <lkp@intel.com>
To: Geoff Levand <geoff@infradead.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Ellerman <mpe@ellerman.id.au>
Subject: arch/powerpc/platforms/ps3/setup.c:229:24: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 4 and 12
Date: Sun, 3 Dec 2023 14:07:09 +0800 [thread overview]
Message-ID: <202312021810.bCVHtweA-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 815fb87b753055df2d9e50f6cd80eb10235fe3e9
commit: 07e2d6cf91079ca01db7fb989a02edd8009dcacd powerpc/ps3: Add firmware version to sysfs
date: 2 years, 6 months ago
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20231202/202312021810.bCVHtweA-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231202/202312021810.bCVHtweA-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/202312021810.bCVHtweA-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/powerpc/platforms/ps3/setup.c: In function 'ps3_setup_arch':
>> arch/powerpc/platforms/ps3/setup.c:229:24: warning: '%u' directive output may be truncated writing between 1 and 5 bytes into a region of size between 4 and 12 [-Wformat-truncation=]
229 | "%u.%u.%u", ps3_firmware_version.major,
| ^~
arch/powerpc/platforms/ps3/setup.c:229:17: note: directive argument in the range [0, 65535]
229 | "%u.%u.%u", ps3_firmware_version.major,
| ^~~~~~~~~~
arch/powerpc/platforms/ps3/setup.c:228:9: note: 'snprintf' output between 6 and 18 bytes into a destination of size 16
228 | snprintf(ps3_firmware_version_str, sizeof(ps3_firmware_version_str),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
229 | "%u.%u.%u", ps3_firmware_version.major,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 | ps3_firmware_version.minor, ps3_firmware_version.rev);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +229 arch/powerpc/platforms/ps3/setup.c
219
220 static void __init ps3_setup_arch(void)
221 {
222 u64 tmp;
223
224 DBG(" -> %s:%d\n", __func__, __LINE__);
225
226 lv1_get_version_info(&ps3_firmware_version.raw, &tmp);
227
228 snprintf(ps3_firmware_version_str, sizeof(ps3_firmware_version_str),
> 229 "%u.%u.%u", ps3_firmware_version.major,
230 ps3_firmware_version.minor, ps3_firmware_version.rev);
231
232 printk(KERN_INFO "PS3 firmware version %s\n", ps3_firmware_version_str);
233
234 ps3_spu_set_platform();
235
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-12-03 6:07 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=202312021810.bCVHtweA-lkp@intel.com \
--to=lkp@intel.com \
--cc=geoff@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpe@ellerman.id.au \
--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