From: kernel test robot <lkp@intel.com>
To: Robert Marko <robimarko@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Kalle Valo <quic_kvalo@quicinc.com>
Subject: drivers/net/wireless/ath/ath10k/core.c:893:50: warning: '%s' directive output may be truncated writing up to 99 bytes into a region of size between 98 and 99
Date: Sat, 6 Jan 2024 09:22:50 +0800 [thread overview]
Message-ID: <202401060901.bCLLpa8q-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a4ab2706bb1280693e7dff1c5c42a8cb9d70c177
commit: f2a7064a78b22f2b68b9fcbc8a6f4c5e61c5ba64 ath10k: support bus and device specific API 1 BDF selection
date: 1 year, 8 months ago
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240106/202401060901.bCLLpa8q-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240106/202401060901.bCLLpa8q-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/202401060901.bCLLpa8q-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/wireless/ath/ath10k/core.c: In function 'ath10k_core_fetch_board_file':
>> drivers/net/wireless/ath/ath10k/core.c:893:50: warning: '%s' directive output may be truncated writing up to 99 bytes into a region of size between 98 and 99 [-Wformat-truncation=]
893 | snprintf(filename, sizeof(filename), "%s/%s", dir, file);
| ^~
......
1247 | ar->normal_mode_fw.board = ath10k_fetch_fw_file(ar,
| ~~~~~~~~~~~~~~~~~~~~~~~~
1248 | ar->hw_params.fw.dir,
| ~~~~~~~~~~~~~~~~~~~~~
1249 | boardname);
| ~~~~~~~~~~
In function 'ath10k_fetch_fw_file',
inlined from 'ath10k_core_fetch_board_data_api_1' at drivers/net/wireless/ath/ath10k/core.c:1247:30,
inlined from 'ath10k_core_fetch_board_file' at drivers/net/wireless/ath/ath10k/core.c:1620:8:
drivers/net/wireless/ath/ath10k/core.c:893:9: note: 'snprintf' output 2 or more bytes (assuming 102) into a destination of size 100
893 | snprintf(filename, sizeof(filename), "%s/%s", dir, file);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +893 drivers/net/wireless/ath/ath10k/core.c
5e3dd157d7e70f Kalle Valo 2013-06-12 878
5e3dd157d7e70f Kalle Valo 2013-06-12 879 static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
5e3dd157d7e70f Kalle Valo 2013-06-12 880 const char *dir,
5e3dd157d7e70f Kalle Valo 2013-06-12 881 const char *file)
5e3dd157d7e70f Kalle Valo 2013-06-12 882 {
5e3dd157d7e70f Kalle Valo 2013-06-12 883 char filename[100];
5e3dd157d7e70f Kalle Valo 2013-06-12 884 const struct firmware *fw;
5e3dd157d7e70f Kalle Valo 2013-06-12 885 int ret;
5e3dd157d7e70f Kalle Valo 2013-06-12 886
5e3dd157d7e70f Kalle Valo 2013-06-12 887 if (file == NULL)
5e3dd157d7e70f Kalle Valo 2013-06-12 888 return ERR_PTR(-ENOENT);
5e3dd157d7e70f Kalle Valo 2013-06-12 889
5e3dd157d7e70f Kalle Valo 2013-06-12 890 if (dir == NULL)
5e3dd157d7e70f Kalle Valo 2013-06-12 891 dir = ".";
5e3dd157d7e70f Kalle Valo 2013-06-12 892
5e3dd157d7e70f Kalle Valo 2013-06-12 @893 snprintf(filename, sizeof(filename), "%s/%s", dir, file);
c8e028026387ea Andres Rodriguez 2018-05-10 894 ret = firmware_request_nowarn(&fw, filename, ar->dev);
9f5bcfe93315d7 Michal Kazior 2017-02-13 895 ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
9f5bcfe93315d7 Michal Kazior 2017-02-13 896 filename, ret);
9f5bcfe93315d7 Michal Kazior 2017-02-13 897
5e3dd157d7e70f Kalle Valo 2013-06-12 898 if (ret)
5e3dd157d7e70f Kalle Valo 2013-06-12 899 return ERR_PTR(ret);
5e3dd157d7e70f Kalle Valo 2013-06-12 900
5e3dd157d7e70f Kalle Valo 2013-06-12 901 return fw;
5e3dd157d7e70f Kalle Valo 2013-06-12 902 }
5e3dd157d7e70f Kalle Valo 2013-06-12 903
:::::: The code at line 893 was first introduced by commit
:::::: 5e3dd157d7e70f0e3cea3f2573ed69fb156a19d5 ath10k: mac80211 driver for Qualcomm Atheros 802.11ac CQA98xx devices
:::::: TO: Kalle Valo <kvalo@qca.qualcomm.com>
:::::: CC: Kalle Valo <kvalo@qca.qualcomm.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-01-06 1:23 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=202401060901.bCLLpa8q-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_kvalo@quicinc.com \
--cc=robimarko@gmail.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
all inboxes | Powered by JetHome®