2016-01-28 03:09, Xie, Huawei: > On 1/28/2016 2:17 AM, Thomas Monjalon wrote: > > 2016-01-27 01:26, Huawei Xie: > >> v2 changes: > >> add missed commit message in v1 > >> > >> fix the error reported by checkpatch: > >> "ERROR: return is not a function, parentheses are not required" > >> > >> also removed other extra parentheses like: > >> "return val == 0" > >> "return (rte_mempool_lookup(...))" > > How these examples are differents from above checkpatch error? > > Don't get it.
Me too ;) I don't understand which paren you removed in "return val == 0" and why you say "also removed other...", meaning it is different from the checkpatch error. > > Please add Fixes: 6307b909b8e0 ("lib: remove extra parenthesis after > > return") > > > > This is the second run after above commit but I still see a lot of them. > > Please check git grep 'return *(' > > > > > > Not a lot of them, just 44 including the document, and all of them are > "return (logical expressions)", which check patch doesn't report as > errors, so i chose to ignor them in the previous patch. I can send new > one which also fixes those code styles. > Btw, is there any reason using this style? > return (a*d < b*c) I think there is no reason. Yes you can remove the parens here. Thanks