All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
@ 2026-05-31 14:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-31 14:18 UTC (permalink / raw)
  To: Timo Alho; +Cc: oe-kbuild-all, Jon Hunter

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-31 14:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-31 14:18 [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 kernel test robot

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.