Skip to contentSkip to conversation

drm/amdgpu/vpe: fix truncation warnings

PATCH In review Lang Yu 2 participants 2 messages Sep 22, 2023

Subsystems (2)
lore
Share & tools
lore

Lang Yu

author
#0 lore raw

PATCH 1/1 drm/amdgpu/vpe: fix truncation warnings

Fixes ab041551f4a7 ("drm/amdgpu: add VPE 6.1.0 support")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +1 -4
index a68354d03a49..81e5600bd545 100644
@@ -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));
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Lang Yu
Sent: Friday, September 22, 2023 4:16 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Chiu, Solomon <[email protected]>; Yu, Lang <[email protected]>; kernel test robot <[email protected]>
Subject: [PATCH] drm/amdgpu/vpe: fix truncation warnings

Fixes ab041551f4a7 ("drm/amdgpu: add VPE 6.1.0 support")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +1 -5
index a68354d03a49..81e5600bd545 100644
@@ -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