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, 29 Nov 2019 12:36:00 +0100
From:   Marco Felsch <m.felsch@...gutronix.de>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Support Opensource <support.opensource@...semi.com>,
        Lee Jones <lee.jones@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, stwiss.opensource@...semi.com,
        Adam Thomson <Adam.Thomson.Opensource@...semi.com>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Sascha Hauer <kernel@...gutronix.de>
Subject: Re: [PATCH v2 1/5] gpio: add support to get local gpio number

On 19-11-29 11:19, Linus Walleij wrote:
> On Fri, Nov 29, 2019 at 11:15 AM Marco Felsch <m.felsch@...gutronix.de> wrote:
> 
> > > What about renaming gpio_chip_hwgpio() everywhere
> > > to gpiod_to_offet(), remove it from drivers/gpio/gpiolib.h
> > > and export it in <linux/gpio/consumer.h> instead?
> >
> > That's also possible but then we have to include the consumer.h header
> > within the gpiolib.c and this seems to be wrong. But since I'm not the
> > maintainer it is up to you and Bart. Both ways are possible,
> 
> What about following the pattern by the clk subsystem and
> create <linux/gpio/private.h> and put it there?
> 
> It should be an indication to people to not use these features
> lightly. We can decorate the header file with some warnings.

That's a good idea. So the following points should be done:
  - rename gpio_chip_hwgpio() to gpiod_to_offset() or gpiod_to_local_offset()
  - move the new helper to <linux/gpio/private.h>
  - add kerneldoc
  - add warnings into the header

Regards,
  Marco

> Yours,
> Linus Walleij
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ