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: <5406D98D.7000402@mentor.com>
Date:	Wed, 3 Sep 2014 13:04:13 +0400
From:	Dmitry Eremin-Solenikov <dmitry_eremin@...tor.com>
To:	Mark Brown <broonie@...nel.org>
CC:	Dirk Behme <dirk.behme@...bosch.com>,
	<linux-kernel@...r.kernel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Gokulkrishnan Nagarajan <Gokulkrishnan.Nagarajan@...bosch.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] regulator: core: GPIO #0 is a valid GPIO

On 09/01/2014 04:49 PM, Mark Brown wrote:
> On Mon, Sep 01, 2014 at 04:35:27PM +0400, Dmitry Eremin-Solenikov wrote:
>> On 09/01/2014 04:06 PM, Mark Brown wrote:
>
>>> Please consider my point about making users instantly buggy - it's not
>>> practical to introduce a new field into existing platform data which
>>> needs initialization.  Disallowing the use of 0 as a GPIO seems more
>>> practical here (in that it's something the platform can control with
>>> more reliable coordination).
>
>> I think that this makes other users buggy - those, whose platforms use GPIO
>> numbering starting from 0. IMX platform does. legacy platforms do.
>
> It means that they can't use this feature for these specific GPIOs
> unless someone writes some code to make it happen either by renumbering
> or by adding generic code that provides a way to specify this, it
> doesn't make anything worse than it is already.
>
>> Consider NO_IRQ which is still defined to -1 on ARM platforms. If a device
>> does not have a connected IRQ, it has to explicitly specify -1 instead of
>> specifying logical default 0. Is it so? What is so different with GPIOs and
>> regulators?
>
> As I'm getting fed up of pointing out we can't make existing users buggy
> - we couldn't do it when we added support for enable GPIOs and we can't
> do it now.  Exactly the same problem would occur if adding platform data
> to specify an interrupt where none was previously specified (which is
> why there's a move away from NO_IRQ being -1).
>
> Please, you need to care about other users.

OK, if the question is about other users, should we review all current 
users that do not specify that gpio, change them to pass -1 and then 
allow valid GPIO#0 as a valid ena_gpio? What do you think about a patch
that will warn for one or two releases that ena_gpio == 0 will change 
meaning in a forthcoming feature?


-- 
With best wishes
Dmitry
--
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