Skip to contentSkip to conversation

backlight: cr_bllcd: Remove unused variable 'intensity'

PATCH In review Wei Yongjun 2 participants 2 messages Jul 21, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backlight: cr_bllcd: Remove unused variable 'intensity'

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")
---
 drivers/video/backlight/cr_bllcd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/video/backlight/cr_bllcd.c +0 -1
index a24d42e1ea3c..4ad0a72531fe 100644
@@ -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);
 
#1 lore raw
Quoted 11 lines · Wei Yongjun

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.

Quoted 6 lines
Fixes 24d34617c24f ("backlight: cr_bllcd: Introduce gpio-backlight semantics")
---
 drivers/video/backlight/cr_bllcd.c | 1 -
 1 file changed, 1 deletion(-)

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

Quoted 13 lines
drivers/video/backlight/cr_bllcd.c +0 -1
index a24d42e1ea3c..4ad0a72531fe 100644
@@ -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);
 
Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog