Re: [PATCH v2 18/19] spi: dw: Use regset32 DebugFS method to create regdump file

From: Andy Shevchenko
Date: Mon May 18 2020 - 07:18:28 EST


On Sat, May 16, 2020 at 11:46:34PM +0300, Serge Semin wrote:
> On Fri, May 15, 2020 at 06:10:56PM +0300, Andy Shevchenko wrote:
> > On Fri, May 15, 2020 at 01:47:57PM +0300, Serge Semin wrote:
> > > DebugFS kernel interface provides a dedicated method to create the
> > > registers dump file. Use it instead of creating a generic DebugFS
> > > file with manually written read callback function.

> > With below nit addressed,
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

> > > +#define DW_SPI_DBGFS_REG(_name, _off) \
> > > +{ \
> > > + .name = _name, \
> >
> > > + .offset = _off \
> >
> > As previously discussed (did I miss your answer?) the comma at the end leaves
> > better pattern for maintenance prospective.
>
> Ah, sorry. Missed that. This comma is hardly needed seeing the structure
> consists of just two elements. So I'd rather leave it as is.

While it's a really small thing, I consider that it's not good to make
someone's else problem what can be done here. So, please, consider to add a
comma. Look at the other drivers and code in the kernel. This is at least
defacto preferred style.

--
With Best Regards,
Andy Shevchenko