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

Lee Jones lee.jones at linaro.org
Wed Jan 13 14:49:51 UTC 2021


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 at gmail.com>
Cc: linux-fbdev at vger.kernel.org
Cc: dri-devel at lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones at linaro.org>
---
 drivers/video/fbdev/nvidia/nv_setup.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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
-- 
2.25.1



More information about the dri-devel mailing list