Re: [PATCH 3/4] SunRPC: Use no_printk() for the null dprintk() and dfprintk()

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

 



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.


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux