All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Krzysztof Hałasa" <khalasa@piap.pl>
Cc: Mario Bambagini <mario.bambagini@gmail.com>,
	linux-kernel@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org
Subject: Re: [PATCH] defines modified to match the 80-char rule
Date: Fri, 03 Jul 2015 09:10:32 -0700	[thread overview]
Message-ID: <1435939832.2487.64.camel@perches.com> (raw)
In-Reply-To: <m3mvzdpkwy.fsf@t19.piap.pl>

On Fri, 2015-07-03 at 12:58 +0200, Krzysztof Hałasa wrote:
> Joe Perches <joe@perches.com> writes:
> 
> > -#define LCONSOLE(mask, format, ...) CDEBUG(D_CONSOLE | (mask), format, ## __VA_ARGS__)
> > -#define LCONSOLE_INFO(format, ...)  CDEBUG_LIMIT(D_CONSOLE, format, ## __VA_ARGS__)
> > -#define LCONSOLE_WARN(format, ...)  CDEBUG_LIMIT(D_CONSOLE | D_WARNING, format, ## __VA_ARGS__)
> > -#define LCONSOLE_ERROR_MSG(errnum, format, ...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, \
> > -			   "%x-%x: " format, errnum, LERRCHKSUM(errnum), ## __VA_ARGS__)
> > -#define LCONSOLE_ERROR(format, ...) LCONSOLE_ERROR_MSG(0x00, format, ## __VA_ARGS__)
> > +#define LCONSOLE(mask, fmt, ...)					\
> > +	CDEBUG(D_CONSOLE | (mask), fmt, ##__VA_ARGS__)
> > +#define LCONSOLE_INFO(fmt, ...)						\
> > +	CDEBUG_LIMIT(D_CONSOLE, fmt, ##__VA_ARGS__)
> > +#define LCONSOLE_WARN(fmt, ...)						\
> > +	CDEBUG_LIMIT(D_CONSOLE | D_WARNING, fmt, ##__VA_ARGS__)
> > +#define LCONSOLE_ERROR_MSG(errnum, fmt, ...)				\
> > +	CDEBUG_LIMIT(D_CONSOLE | D_ERROR, "%x-%x: " fmt,		\
> > +		     errnum, LERRCHKSUM(errnum), ##__VA_ARGS__)
> 
> I don't find it better, actually I think it's much harder to read.
> 
> Maybe that's just me.
> 
> Call me extremist, but I think I could even like the following :-)
> 
> #define   CWARN(format, ...)	CDEBUG_LIMIT(D_WARNING,  format, ## __VA_ARGS__)
> #define  CERROR(format, ...)	CDEBUG_LIMIT(D_ERROR,    format, ## __VA_ARGS__)
> #define CNETERR(format, ...)	CDEBUG_LIMIT(D_NETERROR, format, ## __VA_ARGS__)
> #define  CEMERG(format, ...)	CDEBUG_LIMIT(D_EMERG,    format, ## __VA_ARGS__)

Nah, you're not an extremist, you're just preferring narrowly
localized readability over global consistency.

That's fine and all, until you come up to LCONSOLE_ERROR_MSG
type use which blows the nice old formatting up.

So what I suggested is just a simple consistency thing.



  reply	other threads:[~2015-07-03 16:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 21:21 [PATCH] defines modified to match the 80-char rule Mario Bambagini
2015-07-01  7:59 ` Krzysztof Hałasa
2015-07-02  6:20   ` Joe Perches
2015-07-02 18:01     ` Joe Perches
2015-07-03 10:58       ` Krzysztof Hałasa
2015-07-03 16:10         ` Joe Perches [this message]
2015-07-06  6:07           ` Krzysztof Hałasa
2015-07-06  8:07             ` Joe Perches
2015-07-06 12:16               ` Krzysztof Hałasa
2015-07-08 15:30                 ` Joe Perches
2015-07-06  8:30             ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435939832.2487.64.camel@perches.com \
    --to=joe@perches.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=khalasa@piap.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.bambagini@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.