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

drm/radeon: remove set but not used variable 'blocks'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/radeon/radeon_combios.c: In function radeon_combios_get_power_modes:
drivers/gpu/drm/radeon/radeon_combios.c:2638:10: warning: variable blocks set but not used [-Wunused-but-set-variable]

It is introduced by commit 56278a8edace ("drm/radeon/kms:
pull power mode info from bios tables (v3)"), but never used,
so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

zhengbin and committed by
Alex Deucher
77441f77 5952c489

+1 -2
+1 -2
drivers/gpu/drm/radeon/radeon_combios.c
··· 2638 2638 { 2639 2639 struct drm_device *dev = rdev->ddev; 2640 2640 u16 offset, misc, misc2 = 0; 2641 - u8 rev, blocks, tmp; 2641 + u8 rev, tmp; 2642 2642 int state_index = 0; 2643 2643 struct radeon_i2c_bus_rec i2c_bus; 2644 2644 ··· 2731 2731 offset = combios_get_table_offset(dev, COMBIOS_POWERPLAY_INFO_TABLE); 2732 2732 if (offset) { 2733 2733 rev = RBIOS8(offset); 2734 - blocks = RBIOS8(offset + 0x2); 2735 2734 /* power mode 0 tends to be the only valid one */ 2736 2735 rdev->pm.power_state[state_index].num_clock_modes = 1; 2737 2736 rdev->pm.power_state[state_index].clock_info[0].mclk = RBIOS32(offset + 0x5 + 0x2);