Re: [PATCH v3 1/3] gpio: pca953x: Rewrite ->get_multiple() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 21, 2020 at 5:42 PM Bartosz Golaszewski
<bgolaszewski@xxxxxxxxxxxx> wrote:
> wt., 21 kwi 2020 o 15:03 Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> napisał(a):
> >
> > On Mon, Apr 20, 2020 at 08:27:50PM +0300, Andy Shevchenko wrote:
> > > The commit 96d7c7b3e654 ("gpio: gpio-pca953x, Add get_multiple function")
> > > basically did everything wrong from style and code reuse perspective, i.e.
> > > - it didn't utilize existing PCA953x internal helpers
> > > - it didn't utilize bitmap API
> > > - it misses the point that ilog2(), besides that BANK_SFT is useless,
> > >   can be used in macros
> > > - it has indentation issues.
> > >
> > > Rewrite the function completely.
> >
> > Bart, Linus, please, consider this series to be applied, because it has Uwe's fixes.
> > We may still discuss the approach with ->get_multiple(), though.
> >
>
> Personally I like these patches - if Linus doesn't object in the
> coming days I'll pick them up into my tree as a follow-up to Paul's
> patch.

I don't mind.

I would like that Uwe also agrees that we can merge
these three and use as a base?

I don't mind trying to put in code to optimize use cases
when accessing single bytes here either. But I'd like there
to be explicit comments in the code saying why these
optimizations are there. Can we do those on top of
this (hopefully) known working base?

Yours,
Linus Walleij




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux