[linux-dvb] [PATCH] mt312: coding style improvements

Matthias Schwarzott zzam at gentoo.org
Fri Dec 21 12:02:50 CET 2007


On Freitag, 21. Dezember 2007, Mauro Carvalho Chehab wrote:
> On Thu, 20 Dec 2007, Andreas Oberritter wrote:
> > Matthias Schwarzott wrote:
> >> Changing mt312 driver today.
> >>
> >> The first patch improves codingstyle - I did fix almost all things
> >> checkpatch lists.
> >> I did not change if ((ret = func(a)) < 0) {
 >>
> >> The second patch does remove extra KERN_DEBUG from dprintk calls, as
> >> dprintk already adds KERN_DEBUG:
> >> #define dprintk(args...) \
> >>         do { \
> >>                 if (debug) printk(KERN_DEBUG "mt312: " args); \
> >>         } while (0)
> >
> > Thank you, Matthias!
> >
> > Mauro, can you please apply both patches to your tree?
>
> Sure.
>
> Mathias/Andreas,
>
> Could you send the patches to me? I couldn't find them on my mailboxes.

So here are they!

mt312_codingstyle: fix almost all issues listed by checkpatch
mt312_remove_extra_KERN_DEBUG: removes extra KERN_DEBUG from dprintk calls


checkpatch also lists this:
ERROR: do not use assignment in if condition
if ((ret = mt312_readreg(state, VIT_MODE, &vit_mode)) < 0)
                return ret;

As this pattern is used in many lines of many drivers I wonder if this also 
should be changed or not?

Matthias
-- 
Matthias Schwarzott (zzam)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mt312_codingstyle.diff
Type: text/x-diff
Size: 15057 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20071221/987badfb/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mt312_remove_extra_KERN_DEBUG_from_dprintk.diff
Type: text/x-diff
Size: 1800 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20071221/987badfb/attachment-0001.diff 


More information about the linux-dvb mailing list