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:	Fri, 28 Oct 2011 21:53:54 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Belisko Marek <marek.belisko@...il.com>
Cc:	David Rientjes <rientjes@...gle.com>, swarren@...dia.com,
	grant.likely@...retlab.ca, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] pinmux: Unify pin type from signed to unsigned.

On Thu, Oct 27, 2011 at 8:13 AM, Belisko Marek <marek.belisko@...il.com> wrote:
> On Wed, Oct 26, 2011 at 11:06 PM, David Rientjes <rientjes@...gle.com> wrote:
>> On Wed, 26 Oct 2011, Marek Belisko wrote:
>>
>>>  /* Sufficiently stupid default function when pinctrl is not in use */
>>> -static inline bool pin_is_valid(struct pinctrl_dev *pctldev, int pin)
>>> +static inline bool pin_is_valid(struct pinctrl_dev *pctldev, unsigned int pin)
>>>  {
>>>       return pin >= 0;
>>>  }
>>
>>
>> So this would just become return true, right?
>
> Right I've overlooked it. Will send update version.

Well, actually the idea was that the external interface to the pin control
should have a signed value, so as to detect negative pin numbers as
"invalid".

Internally, and towards the pin control driver backends it is supposed
to be unsigned, because we don't want to have to check it for being
negative all the time.

So can you please make a patch only patching pin_desc_get()
to begin with?

For pin_is_valid() we rather should find out if it will have
any external users (like for GPIO) or if we should just delete
that function (now that pin control doesn't use it internally
anymore).

Yours,
Linus Walleij
--
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