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

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

 



Hi,

Selon Michael Krufky <mkrufky@xxxxxxx>:

> 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@xxxxxxxxxxxxx>
> >>Signed-off-by: Michael Krufky <mkrufky@xxxxxxx>
> >>
> >>
> >
> >
> >
> >>+#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



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux