lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120928022107.GI5040@lizard>
Date:	Thu, 27 Sep 2012 19:21:07 -0700
From:	Anton Vorontsov <anton.vorontsov@...aro.org>
To:	mathieu.poirier@...aro.org
Cc:	linux-kernel@...r.kernel.org, dwmw2@...radead.org
Subject: Re: [PATCH 50/57] power: ab8500-chargalg: update battery health on
 safety timer exp

On Tue, Sep 25, 2012 at 10:12:47AM -0600, mathieu.poirier@...aro.org wrote:
> From: Hakan Berg <hakan.berg@...ricsson.com>
> 
> When the charging safety timer is elapsed the battery health is shown as "Good".
> This is misleading and also hard to distingiush problems reported on "phone
> discharges although charger is attached".
> 
> When safety timer elapses that is an indication of a fault in the battery of
> some kind. Hence report as POWER_SUPPLY_HEALTH_UNSPEC_FAILURE.
> 
> Signed-off-by: Hakan Berg <hakan.berg@...ricsson.com>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
> Reviewed-by: Arun MURTHY <arun.murthy@...ricsson.com>
> Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@...ricsson.com>
> ---
>  drivers/power/abx500_chargalg.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c
> index 4db0ef0..1df238f 100644
> --- a/drivers/power/abx500_chargalg.c
> +++ b/drivers/power/abx500_chargalg.c
> @@ -1711,6 +1711,10 @@ static int abx500_chargalg_get_property(struct power_supply *psy,
>  				val->intval = POWER_SUPPLY_HEALTH_COLD;
>  			else
>  				val->intval = POWER_SUPPLY_HEALTH_OVERHEAT;
> +		} else if (di->charge_state == STATE_SAFETY_TIMER_EXPIRED ||
> +			di->charge_state ==
> +			STATE_SAFETY_TIMER_EXPIRED_INIT) {

Wrong indentation, no need to wrap lines. (You could align to
di->change_state, and thus it'll look prettier and there still wouldn't
need for line wrapping.)

> +			val->intval = POWER_SUPPLY_HEALTH_UNSPEC_FAILURE;
>  		} else {
>  			val->intval = POWER_SUPPLY_HEALTH_GOOD;
>  		}
> -- 
> 1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ