drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable

Submitted by Alex Deucher on Aug. 22, 2019, 3:25 a.m.

Details

Message ID 20190822032527.1376-1-alexander.deucher@amd.com
State Accepted
Commit 75710f08ea7e41b2f7010da3f6deab061f7a853b
Headers show
Series "drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Alex Deucher Aug. 22, 2019, 3:25 a.m.
I think gcc is confused as I don't see how size could be used
unitialized, but go ahead and silence the warning.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
index 5ff0ad439cdc..9750c4194808 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@ -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;

Comments

Reviewed-by: Evan Quan <evan.quan@amd.com>


> -----Original Message-----

> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex

> Deucher

> Sent: Thursday, August 22, 2019 11:25 AM

> To: amd-gfx@lists.freedesktop.org

> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>

> 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.

> 

> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

> ---

>  drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c

> b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c

> index 5ff0ad439cdc..9750c4194808 100644

> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c

> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c

> @@ -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

> 

> _______________________________________________

> amd-gfx mailing list

> amd-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/amd-gfx