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

Mauro Carvalho Chehab mchehab at infradead.org
Fri Dec 21 14:08:02 CET 2007

On Fri, 21 Dec 2007 12:02:50 +0100
Matthias Schwarzott <zzam at gentoo.org> wrote:

> 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

Applied, thanks.

> 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?

Less relevant CodingStyle problems are marked as WARNING. As this is an
"ERROR", seems good to fix.

In the above case, the code is still not so bad, but there are some
constructions that look worse, like:

if ((ret=foo())) { 

(I found this kind of construction on some code I've touched recently on V4L)

While this would be good to fix, I don't see any need for rushing it. 


More information about the linux-dvb mailing list