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: <20130216213248.GC1741@lizard.sbx05280.losalca.wayport.net>
Date:	Sat, 16 Feb 2013 13:32:48 -0800
From:	Anton Vorontsov <anton@...msg.org>
To:	Pali Rohár <pali.rohar@...il.com>
Cc:	David Woodhouse <dwmw2@...radead.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bq27x00_battery: Fix reporting battery temperature

On Sat, Feb 09, 2013 at 12:02:15PM +0100, Pali Rohár wrote:
> On Saturday 09 February 2013 02:57:18 Anton Vorontsov wrote:
> > 
> > Hm. The documentation says tenth (1/10) degrees, and you even
> > restate it in the commit message. But the subject, and your
> > example seem to prove that you still report it in 1/100 of
> > Celsius.
> > 
> > Unless your phone was on fire during the time you took the
> > values, I tend to think the patch needs to be fixed. :-)
> > 
> > Thanks,
> > Anton
> > 
> 
> Ah, my mistake. I very quicky looked that bq and rx driver
> reporting different values... But bad conversation is in
> rx51_battery driver, not in bq. So drop previous bq patch...
> 
> Here is patch for rx51_battery. I think now it should report
> correct temperature. On Nokia N900 it reporting: POWER_SUPPLY_TEMP=350
> 
> From 92efbf24ac2fdc7af41abb12afd5e8c319479f6b Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali.rohar@...il.com>
> Date: Sat, 9 Feb 2013 11:06:48 +0100
> Subject: [PATCH] =?UTF-8?q?rx51=5Fbattery:=20Fix=20reporting=20temperature=20?=
>  =?UTF-8?q?(in=201/10=20=C2=B0C)?=
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit

The patch is missing signed-off-by tag and commit message. :-/

Thanks,

> ---
>  drivers/power/rx51_battery.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c
> index 8208888..527d256 100644
> --- a/drivers/power/rx51_battery.c
> +++ b/drivers/power/rx51_battery.c
> @@ -119,7 +119,7 @@ static int rx51_battery_read_temperature(struct rx51_device_info *di)
>  
>  	/* First check for temperature in first direct table */
>  	if (raw < ARRAY_SIZE(rx51_temp_table1))
> -		return rx51_temp_table1[raw] * 100;
> +		return rx51_temp_table1[raw] * 10;
>  
>  	/* Binary search RAW value in second inverse table */
>  	while (max - min > 1) {
> @@ -132,7 +132,7 @@ static int rx51_battery_read_temperature(struct rx51_device_info *di)
>  			break;
>  	}
>  
> -	return (rx51_temp_table2_first - min) * 100;
> +	return (rx51_temp_table2_first - min) * 10;
>  }
>  
>  /*
> -- 
> 1.7.10.4
> 
> -- 
> Pali Rohár
> pali.rohar@...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