diff mbox series

[v3,11/13] video: fbdev: efifb: Fix set but not used warning for screen_pitch

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

Commit Message

Sam Ravnborg Dec. 6, 2020, 7:02 p.m. UTC
screen_pitch was asssigned a value which was never used.
Drop it to fix the warning

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Peter Jones <pjones@redhat.com>
Cc: linux-fbdev@vger.kernel.org
---
 drivers/video/fbdev/efifb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Thomas Zimmermann Dec. 7, 2020, 1:51 p.m. UTC | #1
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
> screen_pitch was asssigned a value which was never used.
> Drop it to fix the warning
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Peter Jones <pjones@redhat.com>
> Cc: linux-fbdev@vger.kernel.org

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

> ---
>   drivers/video/fbdev/efifb.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
> index e57c00824965..b80ba3d2a9b8 100644
> --- a/drivers/video/fbdev/efifb.c
> +++ b/drivers/video/fbdev/efifb.c
> @@ -139,7 +139,7 @@ static bool efifb_bgrt_sanity_check(struct screen_info *si, u32 bmp_width)
>   
>   static void efifb_show_boot_graphics(struct fb_info *info)
>   {
> -	u32 bmp_width, bmp_height, bmp_pitch, screen_pitch, dst_x, y, src_y;
> +	u32 bmp_width, bmp_height, bmp_pitch, dst_x, y, src_y;
>   	struct screen_info *si = &screen_info;
>   	struct bmp_file_header *file_header;
>   	struct bmp_dib_header *dib_header;
> @@ -193,7 +193,6 @@ static void efifb_show_boot_graphics(struct fb_info *info)
>   	bmp_width = dib_header->width;
>   	bmp_height = abs(dib_header->height);
>   	bmp_pitch = round_up(3 * bmp_width, 4);
> -	screen_pitch = si->lfb_linelength;
>   
>   	if ((file_header->bitmap_offset + bmp_pitch * bmp_height) >
>   				bgrt_image_size)
>
diff mbox series

Patch

diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index e57c00824965..b80ba3d2a9b8 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -139,7 +139,7 @@  static bool efifb_bgrt_sanity_check(struct screen_info *si, u32 bmp_width)
 
 static void efifb_show_boot_graphics(struct fb_info *info)
 {
-	u32 bmp_width, bmp_height, bmp_pitch, screen_pitch, dst_x, y, src_y;
+	u32 bmp_width, bmp_height, bmp_pitch, dst_x, y, src_y;
 	struct screen_info *si = &screen_info;
 	struct bmp_file_header *file_header;
 	struct bmp_dib_header *dib_header;
@@ -193,7 +193,6 @@  static void efifb_show_boot_graphics(struct fb_info *info)
 	bmp_width = dib_header->width;
 	bmp_height = abs(dib_header->height);
 	bmp_pitch = round_up(3 * bmp_width, 4);
-	screen_pitch = si->lfb_linelength;
 
 	if ((file_header->bitmap_offset + bmp_pitch * bmp_height) >
 				bgrt_image_size)