diff mbox series

[1/3] power: supply: ab8500: remove set but not used variables 'vbup33_vrtcn' and 'bup_vch_range'

Message ID 20190717141502.53968-1-yuehaibing@huawei.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [1/3] power: supply: ab8500: remove set but not used variables 'vbup33_vrtcn' and 'bup_vch_range' | expand

Commit Message

Yue Haibing July 17, 2019, 2:15 p.m. UTC
Fixes gcc '-Wunused-but-set-variable' warnings:

drivers/power/supply/ab8500_charger.c:
 In function ab8500_charger_init_hw_registers:
drivers/power/supply/ab8500_charger.c:3013:24: warning:
 variable vbup33_vrtcn set but not used [-Wunused-but-set-variable]
drivers/power/supply/ab8500_charger.c:3013:5: warning:
 variable bup_vch_range set but not used [-Wunused-but-set-variable]

They are not used since commit 4c4268dc97c4 ("power:
supply: ab8500: Drop AB8540/9540 support")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/power/supply/ab8500_charger.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Yue Haibing July 17, 2019, 2:17 p.m. UTC | #1
Sorry, Pls ignore this, I will fix patch title.

On 2019/7/17 22:15, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warnings:
> 
> drivers/power/supply/ab8500_charger.c:
>  In function ab8500_charger_init_hw_registers:
> drivers/power/supply/ab8500_charger.c:3013:24: warning:
>  variable vbup33_vrtcn set but not used [-Wunused-but-set-variable]
> drivers/power/supply/ab8500_charger.c:3013:5: warning:
>  variable bup_vch_range set but not used [-Wunused-but-set-variable]
> 
> They are not used since commit 4c4268dc97c4 ("power:
> supply: ab8500: Drop AB8540/9540 support")
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/power/supply/ab8500_charger.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index 30de448..270a48a 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -3010,7 +3010,6 @@ static int ab8500_charger_usb_get_property(struct power_supply *psy,
>  static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
>  {
>  	int ret = 0;
> -	u8 bup_vch_range = 0, vbup33_vrtcn = 0;
>  
>  	/* Setup maximum charger current and voltage for ABB cut2.0 */
>  	if (!is_ab8500_1p1_or_earlier(di->parent)) {
> @@ -3111,12 +3110,6 @@ static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
>  		goto out;
>  	}
>  
> -	/* Backup battery voltage and current */
> -	if (di->bm->bkup_bat_v > BUP_VCH_SEL_3P1V)
> -		bup_vch_range = BUP_VCH_RANGE;
> -	if (di->bm->bkup_bat_v == BUP_VCH_SEL_3P3V)
> -		vbup33_vrtcn = VBUP33_VRTCN;
> -
>  	ret = abx500_set_register_interruptible(di->dev,
>  		AB8500_RTC,
>  		AB8500_RTC_BACKUP_CHG_REG,
>
diff mbox series

Patch

diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index 30de448..270a48a 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -3010,7 +3010,6 @@  static int ab8500_charger_usb_get_property(struct power_supply *psy,
 static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
 {
 	int ret = 0;
-	u8 bup_vch_range = 0, vbup33_vrtcn = 0;
 
 	/* Setup maximum charger current and voltage for ABB cut2.0 */
 	if (!is_ab8500_1p1_or_earlier(di->parent)) {
@@ -3111,12 +3110,6 @@  static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
 		goto out;
 	}
 
-	/* Backup battery voltage and current */
-	if (di->bm->bkup_bat_v > BUP_VCH_SEL_3P1V)
-		bup_vch_range = BUP_VCH_RANGE;
-	if (di->bm->bkup_bat_v == BUP_VCH_SEL_3P3V)
-		vbup33_vrtcn = VBUP33_VRTCN;
-
 	ret = abx500_set_register_interruptible(di->dev,
 		AB8500_RTC,
 		AB8500_RTC_BACKUP_CHG_REG,