On Mon, Aug 8, 2011 at 8:10 AM, David Howells <[email protected]> wrote:
> Use no_printk() for autofs's no-op DPRINTK() to prevent unused statements from
> becoming accidentally obsolete, and use __VA_ARGS__ too as that's the standard
> way.
Gaah. May I suggest just avoiding the duplication by doing
#ifdef DEBUG
# define autofs_debug_printk printk
#else
# define autofs_debug_printk no_printk
#endif
#define DPRINTK(fmt, ...) \
autofs_debug_printk(KERN_DEBUG "pid %d: %s: " fmt "\n", \
current->pid, __func__, ##__VA_ARGS__)
which also drops the pointless do { } while (0) protection since it's
already a well-formed statement?
Linus
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs