Messages in this thread | | | Subject | Re: [PATCH 3/4] SunRPC: Use no_printk() for the null dprintk() and dfprintk() | From | Joe Perches <> | Date | Thu, 26 Sep 2013 08:30:15 -0700 |
| |
On Thu, 2013-09-26 at 15:45 +0100, David Howells wrote: > Use no_printk() for the null dprintk() and dfprintk() so that the compiler > doesn't complain about unused variables for stuff that's just printed.
no_printk doesn't prevent any argument side-effects from being optimized away by the compiler.
ie: dprintk("%d", func()) func is now always called when before it wasn't.
Are there any side-effects?
btw: Using
#define dprintk(fmt, ...) do { if (0) printk(fmt, ##__VA_ARGS__); } while (0)
does away with side-effects.
| |