[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 8 Aug 2011 09:09:04 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Howells <dhowells@...hat.com>
Cc: linux-kernel@...r.kernel.org, autofs@...ux.kernel.org,
Ian Kent <raven@...maw.net>
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@...hat.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists