Re: [PATCH v2 10/15] staging: fbtft: Fixes some defines styles - Style

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

 



On Thu, Aug 09, 2018 at 06:39:55AM -0300, Leonardo Bras wrote:
> On Wed, Aug 08, 2018 at 02:22:19PM +0200, Greg Kroah-Hartman wrote:
> > On Tue, Aug 07, 2018 at 09:29:25PM -0300, Leonardo Brás wrote:
> > > Fixing some styles as recommended by checkpatch.pl.
> > >
> > > Signed-off-by: Leonardo Brás <leobras.c@xxxxxxxxx>
> > > ---
> > >  drivers/staging/fbtft/fbtft-bus.c  | 10 ++++++----
> > >  drivers/staging/fbtft/fbtft-core.c |  6 ++++--
> > >  drivers/staging/fbtft/fbtft.h      |  4 ++--
> > >  3 files changed, 12 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/drivers/staging/fbtft/fbtft-bus.c
> b/drivers/staging/fbtft/fbtft-bus.c
> > > index 8ce1ff9b6c2a..20d94712cc84 100644
> > > --- a/drivers/staging/fbtft/fbtft-bus.c
> > > +++ b/drivers/staging/fbtft/fbtft-bus.c
> > > @@ -60,11 +60,13 @@ void func(struct fbtft_par *par, int len, ...)
>                           \
> > >  out:
>            \
> > >     va_end(args);
>    \
> > >  }
>        \
> > > -EXPORT_SYMBOL(func);
> > > +EXPORT_SYMBOL(func)
> >
> > why did you change this line?
> 
> checkpatch.pl recommended removing ";" from the end of a macro define,
> and attaching it after the usage of the macro.
> 
> Probably to make the macro usage more likely a function declaration.

Ah, I was confused by your initial subject/changelog, you did not
explain why you were doing what you were doing, and you lumped a bunch
of different types of changes all in a single patch, which is not
allowed.

Please only do one patch per "type" of change, this should be a patch
series.

> > >
> > > -define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
> > > -define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16,
> cpu_to_be16)
> > > -define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
> > > +#define no_modf /*No modifier*/
> >
> > Ick ick ick, no.
> 
> Please help me understand.
> There are 3 steps that may be bad here:
> 1. Defining no_modf as a comment.

Yes.

> 2. Defining no_modf as "nothing"

Yes.

> 3. Using no_modf (defined as nothing) as a filler to avoid not
> passing a "parameter" to the macro.

Yes.

> I understand it may be a combination of the above, but i need
> to understand it better.

Why do you want to do any of the above?  What is wrong with the existing
macro?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux