[dpdk-dev] [PATCH v2] fix checkpatch errors

Xie, Huawei huawei.xie at intel.com
Thu Jan 28 04:09:29 CET 2016


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.

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

This is my grep statement. Checked the error one by one.
grep -P "^\s\s*return\s*\(.*" ./ -r


More information about the dev mailing list