aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLang Yu <[email protected]>2023-09-22 09:23:14 +0800
committerAlex Deucher <[email protected]>2023-09-26 17:00:21 -0400
commit7021b397c684c624800b464dbd3a2f9d945a56a3 (patch)
tree9ee008d23841a0ca9b48ff4c6e86dd5805ab1be2
parentfc105f2a80e548c6c235790feae7611dc0e83991 (diff)
drm/amdgpu/vpe: fix truncation warnings
Fix truncation warnings. Fixes: 9d4346bdbc64 ("drm/amdgpu: add VPE 6.1.0 support") Signed-off-by: Lang Yu <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/oe-kbuild-all/[email protected] Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c5
1 files changed, 1 insertions, 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));