diff mbox series

[13/31] video: fbdev: nvidia: nv_setup: Remove a couple of unused 'tmp' variables

Message ID 20210113145009.1272040-14-lee.jones@linaro.org
State New
Headers show
Series Rid W=1 warnings from Video | expand

Commit Message

Lee Jones Jan. 13, 2021, 2:49 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/video/fbdev/nvidia/nv_setup.c: In function ‘NVWriteAttr’:
 drivers/video/fbdev/nvidia/nv_setup.c:92:14: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]
 drivers/video/fbdev/nvidia/nv_setup.c: In function ‘NVReadAttr’:
 drivers/video/fbdev/nvidia/nv_setup.c:104:14: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

Cc: Antonino Daplas <adaplas@gmail.com>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/video/fbdev/nvidia/nv_setup.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/drivers/video/fbdev/nvidia/nv_setup.c b/drivers/video/fbdev/nvidia/nv_setup.c
index 2fa68669613af..47a96a066f998 100644
--- a/drivers/video/fbdev/nvidia/nv_setup.c
+++ b/drivers/video/fbdev/nvidia/nv_setup.c
@@ -89,9 +89,7 @@  u8 NVReadSeq(struct nvidia_par *par, u8 index)
 }
 void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value)
 {
-	volatile u8 tmp;
-
-	tmp = VGA_RD08(par->PCIO, par->IOBase + 0x0a);
+	VGA_RD08(par->PCIO, par->IOBase + 0x0a);
 	if (par->paletteEnabled)
 		index &= ~0x20;
 	else
@@ -101,9 +99,7 @@  void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value)
 }
 u8 NVReadAttr(struct nvidia_par *par, u8 index)
 {
-	volatile u8 tmp;
-
-	tmp = VGA_RD08(par->PCIO, par->IOBase + 0x0a);
+	VGA_RD08(par->PCIO, par->IOBase + 0x0a);
 	if (par->paletteEnabled)
 		index &= ~0x20;
 	else