Message ID | 20201116174112.1833368-2-lee.jones@linaro.org |
---|---|
State | Accepted |
Commit | bb2585c406dccccaa2a3907f6dbfd6794867ea77 |
Headers | show |
Series | Rid W=1 warnings from GPU (non-Radeon) | expand |
On Mon, Nov 16, 2020 at 12:41 PM Lee Jones <lee.jones@linaro.org> wrote: > > Also removing the call to amdgpu_atombios_encoder_get_backlight_level_from_reg() > since, according to Alex Deucher, "We call it again below indirectly". > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/atombios_encoders.c: In function ‘amdgpu_atombios_encoder_init_backlight’: > drivers/gpu/drm/amd/amdgpu/atombios_encoders.c:174:5: warning: variable ‘backlight_level’ 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: Luben Tuikov <luben.tuikov@amd.com> > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c > index fa817ebff9804..6134ed9640279 100644 > --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c > +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c > @@ -171,7 +171,6 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode > struct backlight_properties props; > struct amdgpu_backlight_privdata *pdata; > struct amdgpu_encoder_atom_dig *dig; > - u8 backlight_level; > char bl_name[16]; > > /* Mac laptops with multiple GPUs use the gmux driver for backlight > @@ -207,8 +206,6 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode > > pdata->encoder = amdgpu_encoder; > > - backlight_level = amdgpu_atombios_encoder_get_backlight_level_from_reg(adev); > - > dig = amdgpu_encoder->enc_priv; > dig->bl_dev = bd; > > -- > 2.25.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c index fa817ebff9804..6134ed9640279 100644 --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c @@ -171,7 +171,6 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode struct backlight_properties props; struct amdgpu_backlight_privdata *pdata; struct amdgpu_encoder_atom_dig *dig; - u8 backlight_level; char bl_name[16]; /* Mac laptops with multiple GPUs use the gmux driver for backlight @@ -207,8 +206,6 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode pdata->encoder = amdgpu_encoder; - backlight_level = amdgpu_atombios_encoder_get_backlight_level_from_reg(adev); - dig = amdgpu_encoder->enc_priv; dig->bl_dev = bd;
Also removing the call to amdgpu_atombios_encoder_get_backlight_level_from_reg() since, according to Alex Deucher, "We call it again below indirectly". Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/atombios_encoders.c: In function ‘amdgpu_atombios_encoder_init_backlight’: drivers/gpu/drm/amd/amdgpu/atombios_encoders.c:174:5: warning: variable ‘backlight_level’ 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: Luben Tuikov <luben.tuikov@amd.com> 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/amdgpu/atombios_encoders.c | 3 --- 1 file changed, 3 deletions(-)