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: <74CDBE0F657A3D45AFBB94109FB122FF1750B77B9F@HQMAIL01.nvidia.com>
Date:	Thu, 8 Dec 2011 14:24:46 -0800
From:	Stephen Warren <swarren@...dia.com>
To:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>,
	Linus Walleij <linus.walleij@...aro.org>
CC:	Randy Dunlap <rdunlap@...otime.net>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: RE: [PATCH] Documentation/pinctrl: various minor fixes

Uwe Kleine-König wrote at Thursday, December 08, 2011 3:22 PM:
> - add some consts
> - don't use the group index alone to determine the value to write to
>   foo's mux register. For spi and i2c the group index is always 0.
>   Additionally using the function index makes much more sense as it
>   generates a different value for each function/group pair.
> - fix a few syntax errors

> @@ -600,7 +600,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector,
>  int foo_enable(struct pinctrl_dev *pctldev, unsigned selector,
>  		unsigned group)
>  {
> -	u8 regbit = (1 << group);
> +	u8 regbit = (1 << selector + group);
> 
>  	writeb((readb(MUX)|regbit), MUX)
>  	return 0;
> @@ -609,7 +609,7 @@ int foo_enable(struct pinctrl_dev *pctldev, unsigned selector,
>  int foo_disable(struct pinctrl_dev *pctldev, unsigned selector,
>  		unsigned group)
>  {
> -	u8 regbit = (1 << group);
> +	u8 regbit = (1 << selector);
> 
>  	writeb((readb(MUX) & ~(regbit)), MUX)
>  	return 0;

Shouldn't those two regbit calculations match?

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ