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

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

Fix warnings by deleting unused code. The register reads are
kept as it is unknown if there are any hidden side-effects.

v2:
- Update subject (Lee)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-21-sam@ravnborg.org

+2 -5
+2 -5
drivers/video/fbdev/nvidia/nv_setup.c
··· 89 89 } 90 90 void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value) 91 91 { 92 - volatile u8 tmp; 93 92 94 - tmp = VGA_RD08(par->PCIO, par->IOBase + 0x0a); 93 + VGA_RD08(par->PCIO, par->IOBase + 0x0a); 95 94 if (par->paletteEnabled) 96 95 index &= ~0x20; 97 96 else ··· 100 101 } 101 102 u8 NVReadAttr(struct nvidia_par *par, u8 index) 102 103 { 103 - volatile u8 tmp; 104 - 105 - tmp = VGA_RD08(par->PCIO, par->IOBase + 0x0a); 104 + VGA_RD08(par->PCIO, par->IOBase + 0x0a); 106 105 if (par->paletteEnabled) 107 106 index &= ~0x20; 108 107 else