Message ID | 20210526084726.552052-3-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Rid W=1 warnings from GPU | expand |
This should be checked. Will send out a patch momentarily. Thanks, Alex On Wed, May 26, 2021 at 4:47 AM Lee Jones <lee.jones@linaro.org> wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c: In function ‘aldebaran_is_dpm_running’: > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c:1260:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] > > Cc: Alex Deucher <alexander.deucher@amd.com> > Cc: "Christian König" <christian.koenig@amd.com> > Cc: David Airlie <airlied@linux.ie> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> > --- > drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c > index d6ce665baaf3b..d077e211017a9 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c > @@ -1368,10 +1368,9 @@ static int aldebaran_usr_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_ > > static bool aldebaran_is_dpm_running(struct smu_context *smu) > { > - int ret = 0; > uint32_t feature_mask[2]; > unsigned long feature_enabled; > - ret = smu_cmn_get_enabled_mask(smu, feature_mask, 2); > + smu_cmn_get_enabled_mask(smu, feature_mask, 2); > feature_enabled = (unsigned long)((uint64_t)feature_mask[0] | > ((uint64_t)feature_mask[1] << 32)); > return !!(feature_enabled & SMC_DPM_FEATURE); > -- > 2.31.1 >
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c index d6ce665baaf3b..d077e211017a9 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c @@ -1368,10 +1368,9 @@ static int aldebaran_usr_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_ static bool aldebaran_is_dpm_running(struct smu_context *smu) { - int ret = 0; uint32_t feature_mask[2]; unsigned long feature_enabled; - ret = smu_cmn_get_enabled_mask(smu, feature_mask, 2); + smu_cmn_get_enabled_mask(smu, feature_mask, 2); feature_enabled = (unsigned long)((uint64_t)feature_mask[0] | ((uint64_t)feature_mask[1] << 32)); return !!(feature_enabled & SMC_DPM_FEATURE);
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c: In function ‘aldebaran_is_dpm_running’: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c:1260:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)