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

Configure Feed

Select the types of activity you want to include in your feed.

video: fbdev: aty: Fix set but not used warnings

Fix W=1 warnings about variables assigned but never used.

- Drop variables that were set but never used
- Make variable definition conditional on ATARI

v2:
- Fix m68k build error (kernel test robot)
- Improve subject (Lee Jones)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: kernel test robot <lkp@intel.com> # m68k build fix
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joe Perches <joe@perches.com>
Cc: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Cc: Jason Yan <yanaijie@huawei.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-6-sam@ravnborg.org

+4 -7
+4 -7
drivers/video/fbdev/aty/atyfb_base.c
··· 2353 2353 int gtb_memsize, has_var = 0; 2354 2354 struct fb_var_screeninfo var; 2355 2355 int ret; 2356 + #ifdef CONFIG_ATARI 2357 + u8 dac_type; 2358 + #endif 2356 2359 2357 2360 init_waitqueue_head(&par->vblank.wait); 2358 2361 spin_lock_init(&par->int_lock); ··· 2363 2360 #ifdef CONFIG_FB_ATY_GX 2364 2361 if (!M64_HAS(INTEGRATED)) { 2365 2362 u32 stat0; 2366 - u8 dac_type, dac_subtype, clk_type; 2363 + u8 dac_subtype, clk_type; 2367 2364 stat0 = aty_ld_le32(CNFG_STAT0, par); 2368 2365 par->bus_type = (stat0 >> 0) & 0x07; 2369 2366 par->ram_type = (stat0 >> 3) & 0x07; 2370 2367 ramname = aty_gx_ram[par->ram_type]; 2371 2368 /* FIXME: clockchip/RAMDAC probing? */ 2372 - dac_type = (aty_ld_le32(DAC_CNTL, par) >> 16) & 0x07; 2373 2369 #ifdef CONFIG_ATARI 2374 2370 clk_type = CLK_ATI18818_1; 2375 2371 dac_type = (stat0 >> 9) & 0x07; ··· 2377 2375 else 2378 2376 dac_subtype = (aty_ld_8(SCRATCH_REG1 + 1, par) & 0xF0) | dac_type; 2379 2377 #else 2380 - dac_type = DAC_IBMRGB514; 2381 2378 dac_subtype = DAC_IBMRGB514; 2382 2379 clk_type = CLK_IBMRGB514; 2383 2380 #endif ··· 3063 3062 if (dp == of_console_device) { 3064 3063 struct fb_var_screeninfo *var = &default_var; 3065 3064 unsigned int N, P, Q, M, T, R; 3066 - u32 v_total, h_total; 3067 3065 struct crtc crtc; 3068 3066 u8 pll_regs[16]; 3069 3067 u8 clock_cntl; ··· 3077 3077 crtc.v_sync_strt_wid = aty_ld_le32(CRTC_V_SYNC_STRT_WID, par); 3078 3078 crtc.gen_cntl = aty_ld_le32(CRTC_GEN_CNTL, par); 3079 3079 aty_crtc_to_var(&crtc, var); 3080 - 3081 - h_total = var->xres + var->right_margin + var->hsync_len + var->left_margin; 3082 - v_total = var->yres + var->lower_margin + var->vsync_len + var->upper_margin; 3083 3080 3084 3081 /* 3085 3082 * Read the PLL to figure actual Refresh Rate.