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: <c06725c3dd34118a324907137758d8b85b3d4043.camel@fi.rohmeurope.com>
Date:   Mon, 4 Nov 2019 06:57:00 +0000
From:   "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
To:     "linus.walleij@...aro.org" <linus.walleij@...aro.org>
CC:     "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
        "dmurphy@...com" <dmurphy@...com>,
        "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "mturquette@...libre.com" <mturquette@...libre.com>,
        "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "mazziesaccount@...il.com" <mazziesaccount@...il.com>,
        "a.zummo@...ertech.it" <a.zummo@...ertech.it>,
        "jacek.anaszewski@...il.com" <jacek.anaszewski@...il.com>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "bgolaszewski@...libre.com" <bgolaszewski@...libre.com>,
        "linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
        "sboyd@...nel.org" <sboyd@...nel.org>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "pavel@....cz" <pavel@....cz>
Subject: Re: [RFC PATCH v3 14/15] gpio: Add definition for GPIO direction

Hello Linus,

On Sun, 2019-11-03 at 23:30 +0100, Linus Walleij wrote:
> Hi Matti!
> 
> Good initiative (and I will see a ton of janitorial patches as a
> result of this...)

Yep. I think I might pull this change out of the RFC and send it
separately. I can also do some conversions for existing drivers - but I
won't probably be able to do all of the drivers. I see no way of doing
any search and replace scripting here - this conversion is going to be
manual work :/

> 
> On Fri, Nov 1, 2019 at 12:50 PM Matti Vaittinen
> <matti.vaittinen@...rohmeurope.com> wrote:
> 
> > At least for me it is difficult to remember the meaning of GPIO
> > direction values. Define GPIO_IN and GPIO_OUT so that occasional
> > GPIO contributors would not need to always check the meaning of
> > hard coded values 1 and 0.
> > 
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> (...)
> > +#define GPIO_IN                1
> > +#define GPIO_OUT       0
> 
> Please spell it out or people will be confused:
> 
> GPIO_LINE_DIRECTION_IN
> GPIO_LINE_DIRECTION_OUT

Right. Besides the 0Day test suite did already spot a few redefinition
problems when some drivers do define GPIO_IN and/or GPIO_OUT... So I'll
change the defines to what you suggest here.

Br,
	Matti Vaittinen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ