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:	Wed, 22 Jun 2011 21:20:41 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	linux-kernel@...r.kernel.org,
	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Liam Girdwood <lrg@...com>, Graeme Gregory <gg@...mlogic.co.uk>
Subject: Re: [PATCH 1/8] regmap: Add generic non-memory mapped register access
 API

On 06/22/2011 09:11 PM, Mark Brown wrote:
> On Wed, Jun 22, 2011 at 09:03:14PM +0200, Lars-Peter Clausen wrote:
>> On 06/22/2011 08:45 PM, Mark Brown wrote:
> 
>>> +	if (map->bus->read_flag_bit)
>>> +		u8[0] |= 1 << map->bus->read_flag_bit;
> 
>> Should be 1 << (map->bus->read_flag_bit - 1)
> 
> The code has the sematic I intended; you can debate if it's the best
> semantic and looking at the documentation again it's not entirely clear
> so at least that should be updated.

Well, then the spi regmap driver needs to use read_flag_bit = 7 instead of
read_flag_bit = 8 and the BUG_ON should also be updated to read_flag_bit >= 8.

And the current code also disallows to use the first bit as the read_flag. So
in my opinion using a one-based index here is a good idea.

> BTW, the reason I put you on the CCs was the hope that you could test on
> OpenMoko (I have one but I've not got any kind of working environment
> set up for it).  You're the nearest thing to a mainline maintainer for
> stuff like the pcf driver.

It's already on my todo list.

--
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