diff mbox series

[v3,10/13] video: fbdev: gbefb: Fix set but not used warning

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

Commit Message

Sam Ravnborg Dec. 6, 2020, 7:02 p.m. UTC
The variable "x" was set but never used.
Drop the redundant assignments.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/video/fbdev/gbefb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Thomas Zimmermann Dec. 7, 2020, 1:50 p.m. UTC | #1
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
> The variable "x" was set but never used.
> Drop the redundant assignments.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>

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

> ---
>   drivers/video/fbdev/gbefb.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c
> index 31270a8986e8..c5b99a4861e8 100644
> --- a/drivers/video/fbdev/gbefb.c
> +++ b/drivers/video/fbdev/gbefb.c
> @@ -198,7 +198,7 @@ static void gbe_reset(void)
>   static void gbe_turn_off(void)
>   {
>   	int i;
> -	unsigned int val, x, y, vpixen_off;
> +	unsigned int val, y, vpixen_off;
>   
>   	gbe_turned_on = 0;
>   
> @@ -249,7 +249,6 @@ static void gbe_turn_off(void)
>   
>   	for (i = 0; i < 100000; i++) {
>   		val = gbe->vt_xy;
> -		x = GET_GBE_FIELD(VT_XY, X, val);
>   		y = GET_GBE_FIELD(VT_XY, Y, val);
>   		if (y < vpixen_off)
>   			break;
> @@ -260,7 +259,6 @@ static void gbe_turn_off(void)
>   		       "gbefb: wait for vpixen_off timed out\n");
>   	for (i = 0; i < 10000; i++) {
>   		val = gbe->vt_xy;
> -		x = GET_GBE_FIELD(VT_XY, X, val);
>   		y = GET_GBE_FIELD(VT_XY, Y, val);
>   		if (y > vpixen_off)
>   			break;
>
diff mbox series

Patch

diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c
index 31270a8986e8..c5b99a4861e8 100644
--- a/drivers/video/fbdev/gbefb.c
+++ b/drivers/video/fbdev/gbefb.c
@@ -198,7 +198,7 @@  static void gbe_reset(void)
 static void gbe_turn_off(void)
 {
 	int i;
-	unsigned int val, x, y, vpixen_off;
+	unsigned int val, y, vpixen_off;
 
 	gbe_turned_on = 0;
 
@@ -249,7 +249,6 @@  static void gbe_turn_off(void)
 
 	for (i = 0; i < 100000; i++) {
 		val = gbe->vt_xy;
-		x = GET_GBE_FIELD(VT_XY, X, val);
 		y = GET_GBE_FIELD(VT_XY, Y, val);
 		if (y < vpixen_off)
 			break;
@@ -260,7 +259,6 @@  static void gbe_turn_off(void)
 		       "gbefb: wait for vpixen_off timed out\n");
 	for (i = 0; i < 10000; i++) {
 		val = gbe->vt_xy;
-		x = GET_GBE_FIELD(VT_XY, X, val);
 		y = GET_GBE_FIELD(VT_XY, Y, val);
 		if (y > vpixen_off)
 			break;