drm/amdgpu: adjust fw_name string length for toc
authorLang Yu <Lang.Yu@amd.com>
Wed, 23 Jun 2021 06:48:34 +0000 (14:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Jul 2021 14:08:00 +0000 (10:08 -0400)
Adjust toc fw_name string length to PSP_FW_NAME_LEN.

Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index c514c05..caae016 100644 (file)
@@ -2985,7 +2985,7 @@ int psp_init_toc_microcode(struct psp_context *psp,
                           const char *chip_name)
 {
        struct amdgpu_device *adev = psp->adev;
-       char fw_name[30];
+       char fw_name[PSP_FW_NAME_LEN];
        const struct psp_firmware_header_v1_0 *toc_hdr;
        int err = 0;