]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/radeon: remove set but not used variable 'blocks'
authorzhengbin <zhengbin13@huawei.com>
Fri, 15 Nov 2019 12:12:59 +0000 (20:12 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Nov 2019 15:12:54 +0000 (10:12 -0500)
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>
drivers/gpu/drm/radeon/radeon_combios.c

index c18ae15189f36fc50c6bdb979979ad65afddb2cc..87794123e5e4d18fcd325debdeabc759fa137e44 100644 (file)
@@ -2638,7 +2638,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
 {
        struct drm_device *dev = rdev->ddev;
        u16 offset, misc, misc2 = 0;
-       u8 rev, blocks, tmp;
+       u8 rev, tmp;
        int state_index = 0;
        struct radeon_i2c_bus_rec i2c_bus;
 
@@ -2731,7 +2731,6 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
                offset = combios_get_table_offset(dev, COMBIOS_POWERPLAY_INFO_TABLE);
                if (offset) {
                        rev = RBIOS8(offset);
-                       blocks = RBIOS8(offset + 0x2);
                        /* power mode 0 tends to be the only valid one */
                        rdev->pm.power_state[state_index].num_clock_modes = 1;
                        rdev->pm.power_state[state_index].clock_info[0].mclk = RBIOS32(offset + 0x5 + 0x2);