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]
Date:	Thu, 27 Sep 2012 18:08:00 -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 45/57] power: ab8500: defer btemp filtering while init

On Tue, Sep 25, 2012 at 10:12:42AM -0600, mathieu.poirier@...aro.org wrote:
> From: Rupesh Kumar <rupesh.kumar@...ricsson.com>
> 
> Due to btemp filtering enabled during init, temp values
> reported to charge algorithm driver started from 0.
> As a result,charge algorithm was going into wrong
> state and charging was stopped.
> This patch defers btemp filtering till init is done.
> 
> Signed-off-by: Rupesh Kumar <rupesh.kumar@...ricsson.com>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
> Reviewed-by: Marcus COOPER <marcus.xm.cooper@...ricsson.com>
> Reviewed-by: Martin SJOBLOM <martin.w.sjoblom@...ricsson.com>
> Reviewed-by: Philippe LANGLAIS <philippe.langlais@...ricsson.com>
> ---
>  drivers/power/ab8500_btemp.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c
> index b24835f..1f33122 100644
> --- a/drivers/power/ab8500_btemp.c
> +++ b/drivers/power/ab8500_btemp.c
> @@ -613,7 +613,6 @@ static void ab8500_btemp_periodic_work(struct work_struct *work)
>  		struct ab8500_btemp, btemp_periodic_work.work);
>  
>  	if (!di->initialized) {
> -		di->initialized = true;
>  		/* Identify the battery */
>  		if (ab8500_btemp_id(di) < 0)
>  			dev_warn(di->dev, "failed to identify the battery\n");
> @@ -626,8 +625,9 @@ static void ab8500_btemp_periodic_work(struct work_struct *work)
>  	 * same temperature. Else only allow 1 degree change from previous
>  	 * reported value in the direction of the new measurement.
>  	 */
> -	if (bat_temp == di->prev_bat_temp || !di->initialized) {
> -		if (di->bat_temp != di->prev_bat_temp || !di->initialized) {
> +	if ((bat_temp == di->prev_bat_temp) || !di->initialized) {
> +		if ((di->bat_temp != di->prev_bat_temp) || !di->initialized) {

This change is stray, and adds completely unneeded parenthesis.

> +			di->initialized = true;
>  			di->bat_temp = bat_temp;
>  			power_supply_changed(&di->btemp_psy);
>  		}
> -- 
> 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