lkml.org 
[lkml]   [2015]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] defines modified to match the 80-char rule
From
Date
On Wed, 2015-07-01 at 09:59 +0200, Krzysztof Hałasa wrote:
> Mario Bambagini <mario.bambagini@gmail.com> 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__)




\
 
 \ /
  Last update: 2015-07-02 08:41    [W:0.060 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site