Re: [PATCH v1 1/1] gpiolib: cdev: Split line_get_debounce_period() and use

From: Andy Shevchenko
Date: Fri Dec 22 2023 - 07:41:11 EST


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@xxxxxxxxx> 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.

--
With Best Regards,
Andy Shevchenko