lkml.org 
[lkml]   [2023]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/1] gpiolib: cdev: Split line_get_debounce_period() and use
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.


\
 
 \ /
  Last update: 2023-12-22 13:59    [W:2.996 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site