Re: [PATCH] mt312: coding style improvements

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

 



On Fri, 21 Dec 2007 12:02:50 +0100
Matthias Schwarzott <zzam@xxxxxxxxxx> 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())) { 
	bar;
}

(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. 


Cheers,
Mauro

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

  Powered by Linux