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: <20190204122511.GG23791@localhost.localdomain>
Date:   Mon, 4 Feb 2019 14:25:11 +0200
From:   Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Matti Vaittinen <mazziesaccount@...il.com>,
        heikki.haikola@...rohmeurope.com, mikko.mutanen@...rohmeurope.com,
        Lee Jones <lee.jones@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Mark Brown <broonie@...nel.org>,
        Greg KH <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Sebastian Reichel <sre@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Guenter Roeck <linux@...ck-us.net>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-clk <linux-clk@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux PM list <linux-pm@...r.kernel.org>,
        linux-rtc@...r.kernel.org,
        LINUXWATCHDOG <linux-watchdog@...r.kernel.org>
Subject: Re: [RFC PATCH v4 07/10] gpio: Initial support for ROHM bd70528 GPIO
 block

On Mon, Feb 04, 2019 at 12:29:53PM +0100, Linus Walleij wrote:
> On Thu, Jan 31, 2019 at 1:08 PM Matti Vaittinen
> <matti.vaittinen@...rohmeurope.com> wrote:
> 
> > ROHM BD70528 PMIC has 4 GPIO pins. Allow them to be
> > controlled by GPIO framework.
> >
> > IRQs are handled by regmap-irq and GPIO driver is not
> > aware of the irq usage.
> >
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> (...)
> > I dropped the review-by from Linus Walleij because I would like to
> > get a comment on if locking is required when we check the direction
> > in order to detect the correct register for getting the pin state.
> 
> I don't know that. You isn't regmap locking inherently?

This direction fetching and then the value reading are two separate
operations at regmap-level. I guess the regmap can't be holding any
locks during two indpendent operations.

> 
> > My initial feeling is that locking makes no sense.
> 
> Mine too.

Yep. I change the comment to explain why I think this race condition
is Ok. We can fix it if it ever turns out to be an issue.

> 
> > +       bdgpio->gpio.get_direction = &bd70528_get_direction;
> > +       bdgpio->gpio.direction_input = &bd70528_direction_input;
> > +       bdgpio->gpio.direction_output = &bd70528_direction_output;
> > +       bdgpio->gpio.set_config = &bd70528_gpio_set_config;
> > +       bdgpio->gpio.can_sleep = true;
> > +       bdgpio->gpio.get = &bd70528_gpio_get;
> > +       bdgpio->gpio.set = &bd70528_gpio_set;
> 
> Drop the &ampersand in from of the functions. All functions
> are pointers.

Yes they are. This & in front of functions when initializing a pointer
with their addresss is my old habit. I liked to consistently use & when
taking address of any beast, whether it was a variable or function.
Getting rid of old habits is not so easy :/ I'll clean thisi at v5 and
put back your Reviewed-by =) Thanks
> 
> With that:
> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> 
> Yours,
> Linus Walleij

-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes.  Just then, he vanished ~~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ