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: <CAMRc=MdzfvnYJt-SkMzYEwp4rKsaJLN_uoBNQ0seuai+im_b=Q@mail.gmail.com>
Date:   Mon, 4 Sep 2023 13:32:38 +0200
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Andrew Jeffery <andrew@...id.au>, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] gpiolib: unexport gpiod_set_transitory()

On Mon, Sep 4, 2023 at 1:19 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> On Mon, Sep 04, 2023 at 01:14:29PM +0200, Bartosz Golaszewski wrote:
> > On Mon, Sep 4, 2023 at 12:19 PM Andy Shevchenko
> > <andriy.shevchenko@...ux.intel.com> wrote:
> > > On Sun, Sep 03, 2023 at 09:06:57PM +0200, Bartosz Golaszewski wrote:
> > > > From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> > > >
> > > > There are no and never have been any users of gpiod_set_transitory()
> > > > outside the core GPIOLIB code. Make it private.
> > >
> > > And rename to be gpio_desc_...()?
> > >
> > > With this done,
> > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > >
> > > The rationale has been explained in the other threads with renaming matters.
> >
> > I'm not buying this explanation. Public GPIO functions don't have a
> > monopoly on the gpiod_ prefix. Eventually I'd love to unify the naming
> > convention for the three important structures that we use:
> > gpio_device, gpio_chip and gpio_desc, no matter whether they're public
> > or private as that's already clear from their placement in
> > include/linux/ or drivers/gpio/.
>
> And I would like to avoid adding confusion by mixing internal and external APIs
> under the same prefix.
>
> Personally I do not like this change, when gpiod_ is being used. So, you may
> override this, you are the maintainer, but then here is the formal NAK from me
> (as a user of these APIs internally and externally).

This is still inconsistent with the rest of the public symbols -
especially those in gpio/driver.h. My long-term plan - before making
locking great again - is to limit the usage of any gpiochip_ symbols
to GPIO providers (as the chip is not guaranteed to be valid, unlike
gpio_device) and provide a bunch of gpio_device_ or gpiodev_
interfaces for use by those who *really* need it. Now am I going to
make up two distinct prefixes for public and non-public APIs? That
will be even more confusing IMO.

Just like in C++ you don't make up special names for public vs private
methods except for some deranged coding styles that also require you
to name arguments like "in_foo" and "out_bar".

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ