diff mbox series

[-next] backlight: cr_bllcd: Remove unused variable 'intensity'

Message ID 20200721134841.33893-1-weiyongjun1@huawei.com (mailing list archive)
State Superseded, archived
Headers show
Series [-next] backlight: cr_bllcd: Remove unused variable 'intensity' | expand

Commit Message

Wei Yongjun July 21, 2020, 1:48 p.m. UTC
Gcc report unused-variable warning as follows:

drivers/video/backlight/cr_bllcd.c:62:6: warning:
 unused variable 'intensity' [-Wunused-variable]
   62 |  int intensity = bd->props.brightness;
      |      ^~~~~~~~~

After commit 24d34617c24f ("backlight: cr_bllcd: Introduce
gpio-backlight semantics"), this variable is never used, this
commit removing it.

Fixes: 24d34617c24f ("backlight: cr_bllcd: Introduce gpio-backlight semantics")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/video/backlight/cr_bllcd.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Lee Jones July 21, 2020, 2:47 p.m. UTC | #1
On Tue, 21 Jul 2020, Wei Yongjun wrote:

> Gcc report unused-variable warning as follows:
> 
> drivers/video/backlight/cr_bllcd.c:62:6: warning:
>  unused variable 'intensity' [-Wunused-variable]
>    62 |  int intensity = bd->props.brightness;
>       |      ^~~~~~~~~
> 
> After commit 24d34617c24f ("backlight: cr_bllcd: Introduce
> gpio-backlight semantics"), this variable is never used, this
> commit removing it.
> 
> Fixes: 24d34617c24f ("backlight: cr_bllcd: Introduce gpio-backlight semantics")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/video/backlight/cr_bllcd.c | 1 -
>  1 file changed, 1 deletion(-)

Thanks for the patch, but this has already been fixed.

> diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c
> index a24d42e1ea3c..4ad0a72531fe 100644
> --- a/drivers/video/backlight/cr_bllcd.c
> +++ b/drivers/video/backlight/cr_bllcd.c
> @@ -59,7 +59,6 @@ struct cr_panel {
>  
>  static int cr_backlight_set_intensity(struct backlight_device *bd)
>  {
> -	int intensity = bd->props.brightness;
>  	u32 addr = gpio_bar + CRVML_PANEL_PORT;
>  	u32 cur = inl(addr);
>  
>
diff mbox series

Patch

diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c
index a24d42e1ea3c..4ad0a72531fe 100644
--- a/drivers/video/backlight/cr_bllcd.c
+++ b/drivers/video/backlight/cr_bllcd.c
@@ -59,7 +59,6 @@  struct cr_panel {
 
 static int cr_backlight_set_intensity(struct backlight_device *bd)
 {
-	int intensity = bd->props.brightness;
 	u32 addr = gpio_bar + CRVML_PANEL_PORT;
 	u32 cur = inl(addr);