[ovs-dev] [PATCHv2] checkpatch: Enforce bracing around conditionals.

Joe Stringer joe at ovn.org
Mon Aug 21 18:44:32 UTC 2017


On 21 August 2017 at 06:31, Aaron Conole <aconole at redhat.com> wrote:
> Joe Stringer <joe at ovn.org> writes:
>
>> The coding style states that BSD-style brace placement should be used,
>> and even single statements should be enclosed. Add checks to checkpatch
>> for this, particularly for 'else' statements.
>>
>> Signed-off-by: Joe Stringer <joe at ovn.org>
>> ---
>
> Acked-by: Aaron Conole <aconole at redhat.com>

Thanks, applied to master.

> Interestingly - if I do:
>
>   $ find lib/ -name \*.c -exec ./utilities/checkpatch.py -f {} \; | \
>          grep bracing | wc -l
>
> before this patch: 92 instances of 'Inappropriate bracing'
> after this patch: 102 instances of 'Inappropriate bracing'

Looks like a few may have slipped through the gaps in the pats. I
guess checkpatch.py is new enough that we haven't swept through the
repo and fixed the complaints yet.


More information about the dev mailing list