Re: [PATCH] defines modified to match the 80-char rule

From: Joe Perches
Date: Thu Jul 02 2015 - 02:20:38 EST


On Wed, 2015-07-01 at 09:59 +0200, Krzysztof HaÅasa wrote:
> Mario Bambagini <mario.bambagini@xxxxxxxxx> writes:
>
> > Defines have been written in more than one line to match the 80-character
> > rule. This error has been fixed 6 times in this file.
> > The file is fully compliant with respect to the coding rules now.
>
> Rules, maybe. But is it better, i.e., more readable?
>
> > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
> > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
[]
> > -#define LCONSOLE(mask, format, ...) CDEBUG(D_CONSOLE | (mask), format, ## __VA_ARGS__)
[]
> > +#define LCONSOLE(mask, format, ...) \
> > + CDEBUG(D_CONSOLE | (mask), format, ## __VA_ARGS__)

> ... I don't think so. Perhaps if I wasn't using the bleading edge tech
> 132-column digital flat LCD screen, I would see this differently (Emacs
> isn't perfect when displaying long lines on IBM monochrome display
> adapter, even with the intelligent-long-lines-wrap package).

I think this isn't particularly nice because of the
different alignment styles used for the macros.

I think it's OK as is, but it _might_ be nicer if it
removed the space after ## and used the same indent
as most other macros.

#define LCONSOLE(mask, fmt, ...) \
CDEBUG(D_CONSOLE | (mask), fmt, ##__VA_ARGS__)

and

#define LCONSOLE_ERROR_MSG(errnum, fmt, ...) \
CDEBUG_LIMIT(D_CONSOLE | D_ERROR, "%x-%x: " fmt, \
errnum, LERRCHKSUM(errnum), ##__VA_ARGS__)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/