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

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

 



Joe Perches <joe@xxxxxxxxxxx> 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__)

-- 
Krzysztof Halasa

Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland
_______________________________________________
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