[linux-dvb] Re: [PATCH] LGDT3302 Frontend Driver

Peter Beutner p.beutner at gmx.net
Tue Jun 28 16:24:30 CEST 2005

Edgar Toernig schrieb:
> Michael Krufky wrote:
>>>Yes but why do you need do {} while(0) stuff ?
>>>You don't need to declare a new block as you add only a if statement, so
>>>+#define dprintk(args...) if (debug) printk(KERN_DEBUG "lgdt3302: " args)
>>>will be a lot's of cleanner...
>>Agreed... I will add make that change.
> Better not.  Code like this will brake horrible without the do-while:
> 	if (foo)
> 		dprintk(...);
> 	else
> 		bar();
I dont see why the code you posted above will break with dprintk defined 
like this:
#define dprintk(args...) if (debug) printk(KERN_DEBUG "lgdt3302: " args)


	if (debug) printk(KERN_DEBUG "lgdt3302: " args);

should work like intended.


> Ciao, ET.
> _______________________________________________
> linux-dvb mailing list
> linux-dvb at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

More information about the linux-dvb mailing list