[PATCH v1 1/1] powerpc/8xx: Drop legacy-of-mm-gpiochip.h header

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Nov 18 23:32:51 AEDT 2024


On Mon, Nov 18, 2024 at 12:02:44PM +0100, Christophe Leroy wrote:
> Le 18/11/2024 à 10:20, Andy Shevchenko a écrit :
> > On Sat, Nov 16, 2024 at 11:44:35AM +0100, Christophe Leroy wrote:
> > > Le 15/11/2024 à 14:38, Andy Shevchenko a écrit :
> > > > Remove legacy-of-mm-gpiochip.h header file, replace of_* functions
> > > > and structs with appropriate alternatives.
> > > 
> > > Looks like you don't really have an alternative to
> > > of_mm_gpiochip_add_data(), you are replacing one single line by 11 new ones,
> > > and that is done twice (once for cpm1_gpiochip_add16(), once for
> > > cpm1_gpiochip_add32()).

Note, the overall statistics is +1 LoC only!

> > True, but that's the issue that we have of_specific API. If someone propose
> > the common API for the agnostic approach,  it would be nice, but I am not
> > the one. And TBH I do not see the advantage of it right now as almost every
> > GPIO driver is using its own labeling schema (*). Note, that this patch also
> > fixes a memory leak as a side effect.
> 
> Can you explain that in the commit message instead of saying you use
> appropriate alternatives that do not exist ?
> 
> Don't hesitate to mention the memory leak it in the commit message as well.
> 
> > *) the legacy API is mostly used by PPC code, do you want that of_mm_* thingy
> > to be moved to PPC specific code instead of killing it? Would be done this
> > way as well.
> 
> No no, your change is ok for me, just need an accurate commit message.

Fine, just sent a v2, which is now compile-tested as suggested below.

...

> > > Does not build:
> > 
> > Crap, I most likely built something else and not these files...
> > I have carefully build-test this for v2.
> 
> Just use mpc885_ads_defconfig

Thanks, that is helpful!

-- 
With Best Regards,
Andy Shevchenko




More information about the Linuxppc-dev mailing list