[PATCH] drm/amdgpu/vpe: fix truncation warnings
Zhang, Yifan
Yifan1.Zhang at amd.com
Fri Sep 22 14:52:02 UTC 2023
[AMD Official Use Only - General]
Reviewed-by: Yifan Zhang <yifan1.zhang at amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Lang Yu
Sent: Friday, September 22, 2023 4:16 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Chiu, Solomon <Solomon.Chiu at amd.com>; Yu, Lang <Lang.Yu at amd.com>; kernel test robot <lkp at intel.com>
Subject: [PATCH] drm/amdgpu/vpe: fix truncation warnings
Fixes: ab041551f4a7 ("drm/amdgpu: add VPE 6.1.0 support")
Signed-off-by: Lang Yu <Lang.Yu at amd.com>
Reported-by: kernel test robot <lkp at intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202309200028.aUVuM8os-lkp@intel.com
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
index a68354d03a49..81e5600bd545 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
@@ -29,8 +29,6 @@
#include "soc15_common.h"
#include "vpe_v6_1.h"
-#define VPE_FW_NAME_LEN 64
-
#define AMDGPU_CSA_VPE_SIZE 64
/* VPE CSA resides in the 4th page of CSA */
#define AMDGPU_CSA_VPE_OFFSET (4096 * 3)
@@ -52,8 +50,7 @@ int amdgpu_vpe_init_microcode(struct amdgpu_vpe *vpe) {
struct amdgpu_device *adev = vpe->ring.adev;
const struct vpe_firmware_header_v1_0 *vpe_hdr;
- char fw_name[VPE_FW_NAME_LEN];
- char fw_prefix[VPE_FW_NAME_LEN];
+ char fw_prefix[32], fw_name[64];
int ret;
amdgpu_ucode_ip_version_decode(adev, VPE_HWIP, fw_prefix, sizeof(fw_prefix));
--
2.25.1
More information about the amd-gfx
mailing list