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

castet.matthieu at free.fr castet.matthieu at free.fr
Tue Jun 28 13:57:06 CEST 2005


Hi,

Selon Michael Krufky <mkrufky at m1k.net>:

> Johannes Stezenbach wrote:
>
> >Michael Krufky wrote:
> >
> >
> >>This driver for the LGDT3302 frontend, used by the DViCO FusionHDTV3
> >>Gold cx88-based hybrid analog/dvb pci card was written by Mac Michaels,
> >>and is currently in the video4linux CVS.  Please apply this to DVB
> >>kernel as soon as possible.
> >>
> >>Signed-off-by: Mac Michaels <wmichaels1 at earthlink.net>
> >>Signed-off-by: Michael Krufky <mkrufky at m1k.net>
> >>
> >>
> >
> >
> >
> >>+#define dprintk(args...) \
> >>+do { \
> >>+if (debug) printk(KERN_DEBUG "lgdt3302: " args); \
> >>+} while (0)
> >>
> >>
> >
> >Interesting formatting...
> >
> >This patch adds a lot of whitespace at end-of-line. After you
> >cleaned that up, please commit it to CVS by yourself, adding
> >the Signed-off-by: lines to the commit message.
> >
> >Thanks,
> >Johannes
> >
> >
> I checked with the original author of this code about the above strange
> formatting, and got many replies from other people...
>
> Alex Deucher wrote:
>
> >The back slashes at the end are so that you can split up a macro
> >across multiple lines.  Do not remove them or the code will break.
> >The C preprocessor will append all the lines with backslashes onto one
> >line.
> >http://en.wikipedia.org/wiki/C_preprocessor
> >
> >
> Mauro Chehab told me (in irc) that the coding style used above DOES
> comply with Linus' kernel standards.
>
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...


Matthieu




More information about the linux-dvb mailing list