Re: [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors

From: Shevchenko, Andriy
Date: Mon Jan 11 2016 - 08:04:08 EST


On Mon, 2016-01-11 at 12:54 +0000, MÃns RullgÃrd wrote:
> "Shevchenko, Andriy" <andriy.shevchenko@xxxxxxxxx> writes:
>
> > On Mon, 2016-01-11 at 14:28 +0200, Andy Shevchenko wrote:
> > > On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote:
> > > > This patch fixes whitespace errors reported by checkpatch to
> > > > increase
> > > > readability. Main focus is on missing spaces after commas in
> > > > function headers and macros (like foo,bar edited to foo, bar).
> > > >
> > > > Signed-off-by: Anton WÃrfel <anton.wuerfel@xxxxxx>
> > > > Signed-off-by: Phillip Raffeck <phillip.raffeck@xxxxxx>
> > > > CC: linux-kernel@xxxxxxxxxxxx
> > >
> > > Cc: looks more standard.
> > >
> > > > --- a/drivers/tty/serial/8250/8250_accent.c
> > > > +++ b/drivers/tty/serial/8250/8250_accent.c
> > > > @@ -10,7 +10,7 @@
> > > > Â#include <linux/init.h>
> > > > Â#include <linux/serial_8250.h>
> > > > Â
> > > > -#define PORT(_base,_irq) \
> > > > +#define PORT(_base, _irq) \
> > > > Â { \
> > > > Â .iobase = _base,
> > > > \
> > > > Â .irq = _irq,
> > > > \
> >
> > 8250_PORT()
> >
> > > >
> > >
> > > While those are okay, I would suggest to make a macro in
> > > drivers/â/8250.h one for all, something like this:
> > >
> > > #define 8250_PORT_FLAGS(_base, _irq, _flags)
> > > â
> > > .flagsÂÂÂÂÂÂÂÂÂÂ= UPF_BOOT_AUTOCONF | (_flags) \
> > >
> > > #define 8250_PORT(_base, _irq) 8250_PORT_FLAGS(_base,
> > > _irq, 0)
> > >
> > > And use it.
> >
> > #define 8250_FOURPORT(_base, _irq) 8250_PORT_FLAGS(_base,
> > _irq,
> > UPF_FOURPORT)
>
> Macro names can't start with a number.

Oh, right, thanks.

SERIAL8250_PORT* will work.

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Intel Finland Oy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.