Messages in this thread | | | From | Linus Torvalds <> | Date | Mon, 8 Aug 2011 09:09:04 -0700 | Subject | Re: [PATCH] autofs4: Use no_printk() for no-op DPRINTK() and use __VA_ARGS__ too |
| |
On Mon, Aug 8, 2011 at 8:10 AM, David Howells <dhowells@redhat.com> 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
| |