* [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
@ 2023-09-19 16:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-19 16:33 UTC (permalink / raw)
To: Lang Yu
Cc: oe-kbuild-all, Linux Memory Management List, Alex Deucher, Huang Rui
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-19 16:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19 16:33 [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 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox