From: kernel test robot <lkp@intel.com>
To: Lang Yu <Lang.Yu@amd.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Alex Deucher <alexander.deucher@amd.com>,
Huang Rui <ray.huang@amd.com>
Subject: [linux-next:master 679/6333] drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:49:52: warning: '%s' directive output may be truncated writing up to 63 bytes into a region of size 57
Date: Wed, 20 Sep 2023 00:33:52 +0800 [thread overview]
Message-ID: <202309200028.aUVuM8os-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 29e400e3ea486bf942b214769fc9778098114113
commit: 9d4346bdbc6484a1814011315827c258509b483c [679/6333] drm/amdgpu: add VPE 6.1.0 support
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230920/202309200028.aUVuM8os-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230920/202309200028.aUVuM8os-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/202309200028.aUVuM8os-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c: In function 'amdgpu_vpe_init_microcode':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:49:52: warning: '%s' directive output may be truncated writing up to 63 bytes into a region of size 57 [-Wformat-truncation=]
49 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", fw_prefix);
| ^~ ~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:49:9: note: 'snprintf' output between 12 and 75 bytes into a destination of size 64
49 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", fw_prefix);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +49 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
39
40 int amdgpu_vpe_init_microcode(struct amdgpu_vpe *vpe)
41 {
42 struct amdgpu_device *adev = vpe->ring.adev;
43 const struct vpe_firmware_header_v1_0 *vpe_hdr;
44 char fw_name[VPE_FW_NAME_LEN];
45 char fw_prefix[VPE_FW_NAME_LEN];
46 int ret;
47
48 amdgpu_ucode_ip_version_decode(adev, VPE_HWIP, fw_prefix, sizeof(fw_prefix));
> 49 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", fw_prefix);
50
51 ret = amdgpu_ucode_request(adev, &adev->vpe.fw, fw_name);
52 if (ret)
53 goto out;
54
55 vpe_hdr = (const struct vpe_firmware_header_v1_0 *)adev->vpe.fw->data;
56 adev->vpe.fw_version = le32_to_cpu(vpe_hdr->header.ucode_version);
57 adev->vpe.feature_version = le32_to_cpu(vpe_hdr->ucode_feature_version);
58
59 return 0;
60 out:
61 dev_err(adev->dev, "fail to initialize vpe microcode\n");
62 release_firmware(adev->vpe.fw);
63 adev->vpe.fw = NULL;
64 return ret;
65 }
66
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-09-19 16:34 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=202309200028.aUVuM8os-lkp@intel.com \
--to=lkp@intel.com \
--cc=Lang.Yu@amd.com \
--cc=alexander.deucher@amd.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ray.huang@amd.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