Skip to content

Commit 5575ce2

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amd/pm: Fix warnings
Fixes warnings: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:286:45: warning: '%s' directive output may be truncated writing up to 29 bytes into a region of size 23 [-Wformat-truncation=] drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:286:52: warning: '%s' directive output may be truncated writing up to 29 bytes into a region of size 23 [-Wformat-truncation=] drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu14/smu_v14_0.c:72:45: warning: '%s' directive output may be truncated writing up to 29 bytes into a region of size 23 [-Wformat-truncation=] drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu14/smu_v14_0.c:72:52: warning: '%s' directive output may be truncated writing up to 29 bytes into a region of size 23 [-Wformat-truncation=] Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d1d4c0b commit 5575ce2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static int smu_v13_0_6_init_microcode(struct smu_context *smu)
270270
struct amdgpu_device *adev = smu->adev;
271271
uint32_t p2s_table_id = P2S_TABLE_ID_A;
272272
int ret = 0, i, p2stable_count;
273-
char ucode_prefix[30];
273+
char ucode_prefix[15];
274274
char fw_name[30];
275275

276276
/* No need to load P2S tables in IOV mode */

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ int smu_v14_0_init_microcode(struct smu_context *smu)
5757
{
5858
struct amdgpu_device *adev = smu->adev;
5959
char fw_name[30];
60-
char ucode_prefix[30];
60+
char ucode_prefix[15];
6161
int err = 0;
6262
const struct smc_firmware_header_v1_0 *hdr;
6363
const struct common_firmware_header *header;

0 commit comments

Comments
 (0)