Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/amdgpu/atombios_encoders: Remove set but unused variable 'backlight_level'

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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lee Jones and committed by
Alex Deucher
bb2585c4 4138b62b

-3
-3
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
··· 171 171 struct backlight_properties props; 172 172 struct amdgpu_backlight_privdata *pdata; 173 173 struct amdgpu_encoder_atom_dig *dig; 174 - u8 backlight_level; 175 174 char bl_name[16]; 176 175 177 176 /* Mac laptops with multiple GPUs use the gmux driver for backlight ··· 205 206 } 206 207 207 208 pdata->encoder = amdgpu_encoder; 208 - 209 - backlight_level = amdgpu_atombios_encoder_get_backlight_level_from_reg(adev); 210 209 211 210 dig = amdgpu_encoder->enc_priv; 212 211 dig->bl_dev = bd;