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]
Date:	Fri, 30 Aug 2013 17:56:20 -0700
From:	Anton Vorontsov <anton@...msg.org>
To:	Belisko Marek <marek.belisko@...il.com>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>, pali.rohar@...il.com
Subject: Re: [PATCH] power: rx51_battery: Replace hardcoded channels values.

> This issue was introduced in commit:
> power: rx51_battery: Replace hardcoded channels values.
> 
> Original code use channel as argument which was shifted by one in function.
> After mentioned commit argument is already shifted so we need to get index
> back.
> 
> Signed-off-by: Marek Belisko <marek.belisko@...n-nandra.com>

Applied, thanks!

> ---
>  drivers/power/rx51_battery.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c
> index 03f5761..1bc5857 100644
> --- a/drivers/power/rx51_battery.c
> +++ b/drivers/power/rx51_battery.c
> @@ -51,7 +51,7 @@ static int rx51_battery_read_adc(int channel)
>   if (twl4030_madc_conversion(&req) <= 0)
>   return -ENODATA;
> 
> - return req.rbuf[channel];
> + return req.rbuf[ffs(channel) - 1];
>  }
> 
>  /*
--
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