diff mbox series

[v2,10/28] video: fbdev: sis: Fix set but not used warnings in sis_main

Message ID 20201128224114.1033617-11-sam@ravnborg.org (mailing list archive)
State Superseded, archived
Headers show
Series drivers/video: W=1 warning fixes | expand

Commit Message

Sam Ravnborg Nov. 28, 2020, 10:40 p.m. UTC
Fix warnings by dropping unused variable and the
unused assignments.

v2:
  - Update subject (Lee)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/video/fbdev/sis/sis_main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Thomas Zimmermann Nov. 30, 2020, 10:14 a.m. UTC | #1
Am 28.11.20 um 23:40 schrieb Sam Ravnborg:
> Fix warnings by dropping unused variable and the
> unused assignments.
> 
> v2:
>    - Update subject (Lee)
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Thomas Winischhofer <thomas@winischhofer.net>
> Cc: Lee Jones <lee.jones@linaro.org>

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/video/fbdev/sis/sis_main.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
> index 03c736f6f3d0..266a5582f94d 100644
> --- a/drivers/video/fbdev/sis/sis_main.c
> +++ b/drivers/video/fbdev/sis/sis_main.c
> @@ -5029,7 +5029,6 @@ static void sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
>   	static const u8 cs168[8] = {
>   		0x48, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00
>   	};
> -	u8 reg;
>   	u8 v1;
>   	u8 v2;
>   	u8 v3;
> @@ -5037,9 +5036,9 @@ static void sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
>   	SiS_SetReg(SISCR, 0xb0, 0x80); /* DDR2 dual frequency mode */
>   	SiS_SetReg(SISCR, 0x82, 0x77);
>   	SiS_SetReg(SISCR, 0x86, 0x00);
> -	reg = SiS_GetReg(SISCR, 0x86);
> +	SiS_GetReg(SISCR, 0x86);
>   	SiS_SetReg(SISCR, 0x86, 0x88);
> -	reg = SiS_GetReg(SISCR, 0x86);
> +	SiS_GetReg(SISCR, 0x86);
>   	v1 = cs168[regb]; v2 = cs160[regb]; v3 = cs158[regb];
>   	if (ivideo->haveXGIROM) {
>   		v1 = bios[regb + 0x168];
> @@ -5049,9 +5048,9 @@ static void sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
>   	SiS_SetReg(SISCR, 0x86, v1);
>   	SiS_SetReg(SISCR, 0x82, 0x77);
>   	SiS_SetReg(SISCR, 0x85, 0x00);
> -	reg = SiS_GetReg(SISCR, 0x85);
> +	SiS_GetReg(SISCR, 0x85);
>   	SiS_SetReg(SISCR, 0x85, 0x88);
> -	reg = SiS_GetReg(SISCR, 0x85);
> +	SiS_GetReg(SISCR, 0x85);
>   	SiS_SetReg(SISCR, 0x85, v2);
>   	SiS_SetReg(SISCR, 0x82, v3);
>   	SiS_SetReg(SISCR, 0x98, 0x01);
>
diff mbox series

Patch

diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
index 03c736f6f3d0..266a5582f94d 100644
--- a/drivers/video/fbdev/sis/sis_main.c
+++ b/drivers/video/fbdev/sis/sis_main.c
@@ -5029,7 +5029,6 @@  static void sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
 	static const u8 cs168[8] = {
 		0x48, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00
 	};
-	u8 reg;
 	u8 v1;
 	u8 v2;
 	u8 v3;
@@ -5037,9 +5036,9 @@  static void sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
 	SiS_SetReg(SISCR, 0xb0, 0x80); /* DDR2 dual frequency mode */
 	SiS_SetReg(SISCR, 0x82, 0x77);
 	SiS_SetReg(SISCR, 0x86, 0x00);
-	reg = SiS_GetReg(SISCR, 0x86);
+	SiS_GetReg(SISCR, 0x86);
 	SiS_SetReg(SISCR, 0x86, 0x88);
-	reg = SiS_GetReg(SISCR, 0x86);
+	SiS_GetReg(SISCR, 0x86);
 	v1 = cs168[regb]; v2 = cs160[regb]; v3 = cs158[regb];
 	if (ivideo->haveXGIROM) {
 		v1 = bios[regb + 0x168];
@@ -5049,9 +5048,9 @@  static void sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
 	SiS_SetReg(SISCR, 0x86, v1);
 	SiS_SetReg(SISCR, 0x82, 0x77);
 	SiS_SetReg(SISCR, 0x85, 0x00);
-	reg = SiS_GetReg(SISCR, 0x85);
+	SiS_GetReg(SISCR, 0x85);
 	SiS_SetReg(SISCR, 0x85, 0x88);
-	reg = SiS_GetReg(SISCR, 0x85);
+	SiS_GetReg(SISCR, 0x85);
 	SiS_SetReg(SISCR, 0x85, v2);
 	SiS_SetReg(SISCR, 0x82, v3);
 	SiS_SetReg(SISCR, 0x98, 0x01);