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] [day] [month] [year] [list]
Message-ID: <20110520154810.GC18099@oksana.dev.rtsoft.ru>
Date:	Fri, 20 May 2011 19:48:10 +0400
From:	Anton Vorontsov <cbouatmailru@...il.com>
To:	Paul Parsons <lost.distance@...oo.com>
Cc:	linux-kernel@...r.kernel.org, dwmw2@...radead.org,
	Dmitry Artamonow <mad_soft@...ox.ru>,
	Philipp Zabel <philipp.zabel@...il.com>
Subject: Re: [PATCH] ds2760_battery: Fix indexing of the 4 active full
 EEPROM registers

On Mon, Apr 25, 2011 at 02:43:30PM +0000, Paul Parsons wrote:
> Fix indexing of the 4 active full EEPROM registers. The indexing was out by 1, accessing the EEPROM registers at 0x23 to 0x26 instead of 0x22 to 0x25.
> 
> Signed-off-by: Paul Parsons <lost.distance@...oo.com>

Applied, thank you!

> ---
> --- clean-2.6.39-rc4/drivers/power/ds2760_battery.c	2011-03-15 01:20:32.000000000 +0000
> +++ linux-2.6.39-rc4/drivers/power/ds2760_battery.c	2011-04-25 13:06:29.344976841 +0100
> @@ -186,7 +190,7 @@ static int ds2760_battery_read_status(st
>  
>  	scale[0] = di->full_active_uAh;
>  	for (i = 1; i < 5; i++)
> -		scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 2 + i];
> +		scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 1 + i];
>  
>  	di->full_active_uAh = battery_interpolate(scale, di->temp_C / 10);
>  	di->full_active_uAh *= 1000; /* convert to µAh */

-- 
Anton Vorontsov
Email: cbouatmailru@...il.com
--
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