diff mbox series

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

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

Commit Message

Yue Haibing April 3, 2019, 7:24 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/video/fbdev/atmel_lcdfb.c: In function 'atmel_lcdfb_remove':
drivers/video/fbdev/atmel_lcdfb.c:1255:28: warning:
 variable 'pdata' set but not used [-Wunused-but-set-variable]

It's not used since commit 42110e91de7f ("video: atmel_lcdfb: introduce
atmel_lcdfb_power_control")

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

Comments

Nicolas Ferre April 3, 2019, 8:20 a.m. UTC | #1
On 03/04/2019 at 09:24, YueHaibing wrote:
> External E-Mail
> 
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/video/fbdev/atmel_lcdfb.c: In function 'atmel_lcdfb_remove':
> drivers/video/fbdev/atmel_lcdfb.c:1255:28: warning:
>   variable 'pdata' set but not used [-Wunused-but-set-variable]
> 
> It's not used since commit 42110e91de7f ("video: atmel_lcdfb: introduce
> atmel_lcdfb_power_control")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Indeed:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks!

> ---
>   drivers/video/fbdev/atmel_lcdfb.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index b8786ff62b87..e67dfd94bf1d 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -1252,12 +1252,10 @@ static int __exit atmel_lcdfb_remove(struct platform_device *pdev)
>   	struct device *dev = &pdev->dev;
>   	struct fb_info *info = dev_get_drvdata(dev);
>   	struct atmel_lcdfb_info *sinfo;
> -	struct atmel_lcdfb_pdata *pdata;
>   
>   	if (!info || !info->par)
>   		return 0;
>   	sinfo = info->par;
> -	pdata = &sinfo->pdata;
>   
>   	cancel_work_sync(&sinfo->task);
>   	exit_backlight(sinfo);
> 
> 
> 
> 
>
Bartlomiej Zolnierkiewicz April 11, 2019, 5:23 p.m. UTC | #2
On 04/03/2019 10:20 AM, Nicolas.Ferre@microchip.com wrote:
> On 03/04/2019 at 09:24, YueHaibing wrote:
>> External E-Mail
>>
>>
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/video/fbdev/atmel_lcdfb.c: In function 'atmel_lcdfb_remove':
>> drivers/video/fbdev/atmel_lcdfb.c:1255:28: warning:
>>   variable 'pdata' set but not used [-Wunused-but-set-variable]
>>
>> It's not used since commit 42110e91de7f ("video: atmel_lcdfb: introduce
>> atmel_lcdfb_power_control")
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Indeed:
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Patch queued for v5.2, thanks.

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

Patch

diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index b8786ff62b87..e67dfd94bf1d 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -1252,12 +1252,10 @@  static int __exit atmel_lcdfb_remove(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct fb_info *info = dev_get_drvdata(dev);
 	struct atmel_lcdfb_info *sinfo;
-	struct atmel_lcdfb_pdata *pdata;
 
 	if (!info || !info->par)
 		return 0;
 	sinfo = info->par;
-	pdata = &sinfo->pdata;
 
 	cancel_work_sync(&sinfo->task);
 	exit_backlight(sinfo);