From: kernel test robot <lkp@intel.com>
To: Jiri Pirko <jiri@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Ido Schimmel <idosch@nvidia.com>
Subject: drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:776:9: warning: '.bin' directive output may be truncated writing 4 bytes into a region of size between 3 and 11
Date: Wed, 18 Oct 2023 20:32:45 +0800 [thread overview]
Message-ID: <202310182014.0kOuH8vx-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06dc10eae55b5ceabfef287a7e5f16ceea204aa0
commit: b217127e5e4ee0ecfce7c5f84cfe082238123bda mlxsw: core_linecards: Add line card objects and implement provisioning
date: 1 year, 6 months ago
config: riscv-randconfig-r001-20230902 (https://download.01.org/0day-ci/archive/20231018/202310182014.0kOuH8vx-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231018/202310182014.0kOuH8vx-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/202310182014.0kOuH8vx-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c: In function 'mlxsw_linecard_types_init.isra':
>> drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:776:9: warning: '.bin' directive output may be truncated writing 4 bytes into a region of size between 3 and 11 [-Wformat-truncation=]
776 | "mellanox/lc_ini_bundle_%u_%u.bin"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:790:24: note: in expansion of macro 'MLXSW_LINECARDS_INI_BUNDLE_FILENAME_FMT'
790 | MLXSW_LINECARDS_INI_BUNDLE_FILENAME_FMT,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:776:38: note: format string is defined here
776 | "mellanox/lc_ini_bundle_%u_%u.bin"
| ^~~~
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:789:15: note: 'snprintf' output between 31 and 39 bytes into a destination of size 37
789 | err = snprintf(filename, sizeof(filename),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
790 | MLXSW_LINECARDS_INI_BUNDLE_FILENAME_FMT,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
791 | rev->minor, rev->subminor);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +776 drivers/net/ethernet/mellanox/mlxsw/core_linecards.c
774
775 #define MLXSW_LINECARDS_INI_BUNDLE_FILENAME_FMT \
> 776 "mellanox/lc_ini_bundle_%u_%u.bin"
777 #define MLXSW_LINECARDS_INI_BUNDLE_FILENAME_LEN \
778 (sizeof(MLXSW_LINECARDS_INI_BUNDLE_FILENAME_FMT) + 4)
779
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-10-18 12: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=202310182014.0kOuH8vx-lkp@intel.com \
--to=lkp@intel.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.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®