From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu) Date: Sat, 08 Oct 2016 15:40:22 -0400 Subject: if/else block default coding style question In-Reply-To: <20161008151918.GA1716@osadl.at> References: <20161008104037.GA493@osadl.at> <78160.1475938721@turing-police.cc.vt.edu> <20161008151918.GA1716@osadl.at> Message-ID: <100214.1475955622@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Sat, 08 Oct 2016 15:19:18 -0000, Nicholas Mc Guire said: > Thats actually the cause of this mail - it just becaem obvious > that some of these if==else are intentional At the very least, the intentional ones need a comment similar to the one found in file.c > Now reporting these cases if they should be fixed makes sense > while if this is accepted practice then it would be reporting > false-positives, which would be bad. Coccinelle can only warn about things that syntactically look suspicious. The person running Coccinelle needs to have enough neurons to double-check for comments explaining the odd usage, etc - and the person creating that sort of code needs to leave some bread crumbs for people reading the code. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 484 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161008/81c27344/attachment.bin