All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Timo Alho <talho@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev, Jon Hunter <jonathanh@nvidia.com>
Subject: [jonhunter:tegra/next-fixes 5/24] drivers/clk/tegra/clk-bpmp.c:373:62: warning: '%s' directive output may be truncated writing up to 39 bytes into a region of size between 28 and 38
Date: Sun, 31 May 2026 22:18:14 +0800	[thread overview]
Message-ID: <202605312211.QMin2ACt-lkp@intel.com> (raw)

tree:   https://github.com/jonhunter/linux tegra/next-fixes
head:   bbc9d83793001800cd9fd2e531bf692526351dcb
commit: a4050db6c37daf99cf1df1ddc6f16f0a373ee7c2 [5/24] clk: tegra: Support unique names for multi-socket platforms
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20260531/202605312211.QMin2ACt-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260531/202605312211.QMin2ACt-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/202605312211.QMin2ACt-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/clk/tegra/clk-bpmp.c: In function 'tegra_bpmp_clk_get_info':
>> drivers/clk/tegra/clk-bpmp.c:373:62: warning: '%s' directive output may be truncated writing up to 39 bytes into a region of size between 28 and 38 [-Wformat-truncation=]
     373 |                 snprintf(info->name, sizeof(info->name), "%d-%s",
         |                                                              ^~
     374 |                          dev_to_node(bpmp->dev), response.name);
         |                                                  ~~~~~~~~~~~~~
   drivers/clk/tegra/clk-bpmp.c:373:17: note: 'snprintf' output between 3 and 52 bytes into a destination of size 40
     373 |                 snprintf(info->name, sizeof(info->name), "%d-%s",
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     374 |                          dev_to_node(bpmp->dev), response.name);
         |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +373 drivers/clk/tegra/clk-bpmp.c

   351	
   352	static int tegra_bpmp_clk_get_info(struct tegra_bpmp *bpmp, unsigned int id,
   353					   struct tegra_bpmp_clk_info *info)
   354	{
   355		struct cmd_clk_get_all_info_response response;
   356		struct tegra_bpmp_clk_message msg;
   357		unsigned int i;
   358		int err;
   359	
   360		memset(&msg, 0, sizeof(msg));
   361		msg.cmd = CMD_CLK_GET_ALL_INFO;
   362		msg.id = id;
   363		msg.rx.data = &response;
   364		msg.rx.size = sizeof(response);
   365	
   366		err = tegra_bpmp_clk_transfer(bpmp, &msg);
   367		if (err < 0)
   368			return err;
   369	
   370		if (dev_to_node(bpmp->dev) == NUMA_NO_NODE)
   371			strscpy(info->name, response.name, MRQ_CLK_NAME_MAXLEN);
   372		else
 > 373			snprintf(info->name, sizeof(info->name), "%d-%s",
   374				 dev_to_node(bpmp->dev), response.name);
   375	
   376		info->num_parents = response.num_parents;
   377	
   378		for (i = 0; i < info->num_parents; i++)
   379			info->parents[i] = response.parents[i];
   380	
   381		info->flags = response.flags;
   382	
   383		return 0;
   384	}
   385	

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

                 reply	other threads:[~2026-05-31 14:18 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=202605312211.QMin2ACt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jonathanh@nvidia.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=talho@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.