public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 2/2] gpiolib: rename gpio_chip_hwgpio() for consistency
Date: Tue, 5 Sep 2023 13:33:57 +0300	[thread overview]
Message-ID: <ZPcEFXF9Fz762kzK@smile.fi.intel.com> (raw)
In-Reply-To: <CAMRc=MeMYi0KbK=1RYGX2zbUjVZyQp-Y_aXfy6+EZcEtUSEU0A@mail.gmail.com>

On Tue, Sep 05, 2023 at 10:37:32AM +0200, Bartosz Golaszewski wrote:
> On Mon, Sep 4, 2023 at 11:27 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, Sep 04, 2023 at 09:34:10AM +0200, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > >
> > > All other functions that manipulate a struct gpio_desc use the gpiod_
> > > prefix. Follow this convention and rename gpio_chip_hwgpio() to
> > > gpiod_get_hwgpio().
> >
> > Same comment. Also, I don't think it's good idea as it steps on the exported
> > API's toes. I.o.w. I won't mix those two.
> 
> Even if I agreed with your other comment, gpio_chip_hwgpio() is a
> terrible name and if I didn't know, I couldn't tell you what it does
> just from looking at the name.

That's can be improved, my previous comments were basically to avoid
mixing prefixes for internal and external APIs, let's say prefix them
similarly, but for internal with space and/or more verbose naming

	gpiod_		gpio_desc_
	gpiochip_	gpio_chip_
	gdev_		gpio_device_

(as an example).

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-09-05 16:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04  7:34 [PATCH 1/2] gpiolib: rename gpio_set_debounce_timeout() for consistency Bartosz Golaszewski
2023-09-04  7:34 ` [PATCH 2/2] gpiolib: rename gpio_chip_hwgpio() " Bartosz Golaszewski
2023-09-04  9:27   ` Andy Shevchenko
2023-09-05  8:37     ` Bartosz Golaszewski
2023-09-05 10:33       ` Andy Shevchenko [this message]
2023-09-05 11:26         ` Bartosz Golaszewski
2023-09-05 11:59           ` Andy Shevchenko
2023-09-06 21:39       ` Linus Walleij
2023-09-04  9:24 ` [PATCH 1/2] gpiolib: rename gpio_set_debounce_timeout() " Andy Shevchenko
2023-09-04  9:30   ` Andy Shevchenko
2023-09-05  8:36   ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZPcEFXF9Fz762kzK@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox