public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v1 1/1] gpiolib: cdev: Split line_get_debounce_period() and use
Date: Fri, 22 Dec 2023 20:58:37 +0800	[thread overview]
Message-ID: <ZYWH_ZLOz7eKh0CE@rigel> (raw)
In-Reply-To: <ZYWD26B-xQqiDOD2@smile.fi.intel.com>

On Fri, Dec 22, 2023 at 02:40:59PM +0200, Andy Shevchenko wrote:
> On Fri, Dec 22, 2023 at 09:58:48AM +0100, Bartosz Golaszewski wrote:
> > On Fri, Dec 22, 2023 at 2:12 AM Kent Gibson <warthog618@gmail.com> wrote:
> > >
> > > On Thu, Dec 21, 2023 at 07:55:27PM +0200, Andy Shevchenko wrote:
> > > > Instead of repeating the same code and reduce possible miss
> > > > of READ_ONCE(), split line_get_debounce_period() heler out
> > > > and use in the existing cases.
> > > >
> > >
> > > helper
> > >
> > >
> > > Not a fan of this change.
> > >
> >
> > Yeah, sorry but NAK. READ_ONCE() is well known and tells you what the
> > code does. Arbitrary line_get_debounce_period() makes me have to look
> > it up.
>
> We have setter, but not getter. It looks confusing, more over, the setter makes
> much more than just set. Hence another way to solve this is make clear (by
> changing name) that the setter is not _just_ a setter.
>

As I mentioned elsewhere, the side effects of the setter are irrelevant
to the caller, so from their point of view it is _just_ a setter.
Calling it something else would actually be more confusing.

Cheers,
Kent.


  reply	other threads:[~2023-12-22 12:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 17:55 [PATCH v1 1/1] gpiolib: cdev: Split line_get_debounce_period() and use Andy Shevchenko
2023-12-22  1:12 ` Kent Gibson
2023-12-22  8:58   ` Bartosz Golaszewski
2023-12-22 12:40     ` Andy Shevchenko
2023-12-22 12:58       ` Kent Gibson [this message]
2023-12-22 12:39   ` Andy Shevchenko
2023-12-22 12:56     ` Kent Gibson
2023-12-22 13:37       ` Bartosz Golaszewski
2023-12-22 14:08         ` Kent Gibson
2023-12-22 14:09           ` Bartosz Golaszewski
2023-12-22 14:14             ` Kent Gibson
2023-12-22 17:49               ` Linus Walleij
2023-12-23  2:08                 ` Kent Gibson
2023-12-28  0:26                   ` Linus Walleij
2023-12-28  0:49                     ` Kent Gibson

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=ZYWH_ZLOz7eKh0CE@rigel \
    --to=warthog618@gmail.com \
    --cc=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