* [linux-next:master 13404/13571] drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:105:73: warning: '.bin' directive output may be truncated writing 4 bytes into a region of size between 2 and 31
@ 2024-03-15 2:54 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-15 2:54 UTC (permalink / raw)
To: Saleemkhan Jamadar
Cc: oe-kbuild-all, Linux Memory Management List, Alex Deucher,
Veerabadhran Gopalakrishnan, Leo Liu
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9bb9b28d0568991b1d63e66fe75afa5f97ad1156
commit: b041fcaa26186dcfc121bcb9db285d6c73fd74e3 [13404/13571] drm/amdgpu/vcn: enable vcn1 fw load for VCN 4_0_6
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240315/202403151008.QYEoXojA-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240315/202403151008.QYEoXojA-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/202403151008.QYEoXojA-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c: In function 'amdgpu_vcn_early_init':
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:102:66: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
102 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", ucode_prefix);
| ^
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:102:17: note: 'snprintf' output between 12 and 41 bytes into a destination of size 40
102 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", ucode_prefix);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:105:73: warning: '.bin' directive output may be truncated writing 4 bytes into a region of size between 2 and 31 [-Wformat-truncation=]
105 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_%d.bin", ucode_prefix, i);
| ^~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:105:25: note: 'snprintf' output between 14 and 43 bytes into a destination of size 40
105 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_%d.bin", ucode_prefix, i);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +105 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
93
94 int amdgpu_vcn_early_init(struct amdgpu_device *adev)
95 {
96 char ucode_prefix[30];
97 char fw_name[40];
98 int r, i;
99
100 for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
101 amdgpu_ucode_ip_version_decode(adev, UVD_HWIP, ucode_prefix, sizeof(ucode_prefix));
102 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", ucode_prefix);
103 if (amdgpu_ip_version(adev, UVD_HWIP, 0) == IP_VERSION(4, 0, 6) &&
104 i == 1) {
> 105 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_%d.bin", ucode_prefix, i);
106 }
107
108 r = amdgpu_ucode_request(adev, &adev->vcn.fw[i], fw_name);
109 if (r) {
110 amdgpu_ucode_release(&adev->vcn.fw[i]);
111 return r;
112 }
113 }
114 return r;
115 }
116
--
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:[~2024-03-15 2:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-15 2:54 [linux-next:master 13404/13571] drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:105:73: warning: '.bin' directive output may be truncated writing 4 bytes into a region of size between 2 and 31 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