public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Alex Deucher <alexander.deucher@amd.com>,
	Lijo Lazar <lijo.lazar@amd.com>
Subject: drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1438:58: warning: '%s' directive output may be truncated writing up to 1 bytes into a region of size between 0 and 29
Date: Thu, 19 Oct 2023 10:12:41 +0800	[thread overview]
Message-ID: <202310191030.lSSsOQCJ-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dd72f9c7e512da377074d47d990564959b772643
commit: cc42e76e7de5190a7da5dac9d7b2bbb458e050bf drm/amd: Load MES microcode during early_init
date:   9 months ago
config: x86_64-randconfig-r006-20230904 (https://download.01.org/0day-ci/archive/20231019/202310191030.lSSsOQCJ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231019/202310191030.lSSsOQCJ-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/202310191030.lSSsOQCJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function 'amdgpu_mes_ctx_alloc_meta_data':
   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1099:13: warning: variable 'r' set but not used [-Wunused-but-set-variable]
    1099 |         int r;
         |             ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function 'amdgpu_mes_init_microcode':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1438:58: warning: '%s' directive output may be truncated writing up to 1 bytes into a region of size between 0 and 29 [-Wformat-truncation=]
    1438 |         snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes%s.bin",
         |                                                          ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1438:9: note: 'snprintf' output between 16 and 46 bytes into a destination of size 40
    1438 |         snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes%s.bin",
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1439 |                 ucode_prefix,
         |                 ~~~~~~~~~~~~~
    1440 |                 pipe == AMDGPU_MES_SCHED_PIPE ? "" : "1");
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +1438 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c

  1428	
  1429	int amdgpu_mes_init_microcode(struct amdgpu_device *adev, int pipe)
  1430	{
  1431		const struct mes_firmware_header_v1_0 *mes_hdr;
  1432		struct amdgpu_firmware_info *info;
  1433		char ucode_prefix[30];
  1434		char fw_name[40];
  1435		int r;
  1436	
  1437		amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, sizeof(ucode_prefix));
> 1438		snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes%s.bin",

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

                 reply	other threads:[~2023-10-19  2:13 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=202310191030.lSSsOQCJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=lijo.lazar@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --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