diff mbox series

[-next] video: fbdev: remove set but not used variable 'size'

Message ID 20190330022626.97340-1-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] video: fbdev: remove set but not used variable 'size' | expand

Commit Message

Yue Haibing March 30, 2019, 2:26 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/video/fbdev/pvr2fb.c: In function 'pvr2fb_init':
drivers/video/fbdev/pvr2fb.c:1074:6: warning:
 variable 'size' set but not used [-Wunused-but-set-variable]

It's not used since commit 9cd1c6743454 ("pvr2fb: Fix oops when
pseudo_palette is written")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/video/fbdev/pvr2fb.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Bartlomiej Zolnierkiewicz April 11, 2019, 3:45 p.m. UTC | #1
On 03/30/2019 03:26 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/video/fbdev/pvr2fb.c: In function 'pvr2fb_init':
> drivers/video/fbdev/pvr2fb.c:1074:6: warning:
>  variable 'size' set but not used [-Wunused-but-set-variable]
> 
> It's not used since commit 9cd1c6743454 ("pvr2fb: Fix oops when
> pseudo_palette is written")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Patch queued for v5.2 with minor change in the patch summary
("video: fbdev: pvr2fb: remove set but not used variable 'size'"),
thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
diff mbox series

Patch

diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
index 41390c8e0f67..4e4d6a0df978 100644
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -1071,7 +1071,6 @@  static struct pvr2_board {
 static int __init pvr2fb_init(void)
 {
 	int i, ret = -ENODEV;
-	int size;
 
 #ifndef MODULE
 	char *option = NULL;
@@ -1080,7 +1079,6 @@  static int __init pvr2fb_init(void)
 		return -ENODEV;
 	pvr2fb_setup(option);
 #endif
-	size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32);
 
 	fb_info = framebuffer_alloc(sizeof(struct pvr2fb_par), NULL);