Skip to contentSkip to conversation

drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable

PATCH In review Alex Deucher 2 participants 2 messages Aug 22, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable

I think gcc is confused as I don't see how size could be used unitialized, but go ahead and silence the warning.

---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +1 -1
index 5ff0ad439cdc..9750c4194808 100644
@@ -359,7 +359,7 @@ static int smu_v11_0_setup_pptable(struct smu_context *smu)
 	struct amdgpu_device *adev = smu->adev;
 	const struct smc_firmware_header_v1_0 *hdr;
 	int ret, index;
-	uint32_t size;
+	uint32_t size = 0;
 	uint16_t atom_table_size;
 	uint8_t frev, crev;
 	void *table;
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20190822032527.1376-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by Evan Quan
#2 lore raw
Quoted 35 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, August 22, 2019 11:25 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable

I think gcc is confused as I don't see how size could be used unitialized, but go ahead and silence the warning.

---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +1 -1
index 5ff0ad439cdc..9750c4194808 100644
@@ -359,7 +359,7 @@ static int smu_v11_0_setup_pptable(struct
 smu_context *smu)
 	struct amdgpu_device *adev = smu->adev;
 	const struct smc_firmware_header_v1_0 *hdr;
 	int ret, index;
-	uint32_t size;
+	uint32_t size = 0;
 	uint16_t atom_table_size;
 	uint8_t frev, crev;

void *table;
--
2.20.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx