On 19.07.2019 18:48, Volodymyr Babchuk wrote:
> Jan Beulich writes:
>> --- a/CODING_STYLE
>> +++ b/CODING_STYLE
>> @@ -64,8 +64,13 @@ Bracing
>>    -------
>>
>>    Braces ('{' and '}') are usually placed on a line of their own, except
>> -for the do/while loop.  This is unlike the Linux coding style and
>> -unlike K&R.  do/while loops are an exception. e.g.:
>> +for
>> +- the do/while loop
>> +- the opening brace in definitions of enum, struct, and union
>> +- the opening brace in initializers
>> +- compound literals
> Looks like this leaves us only with "if/else", "for", "switch" and
> various forms of "for_each_*". So maybe it is worth to rewrite this
> in the opposite manner? Like this:

That's an option, but I'm not sure I'd want to go that route. Note
also how you don't mention e.g. "asm" and "return".

> Braces ('{' and '}') are usually placed on the same line, except the
> following cases:
> 
>   - if, else, for, switch statements
>   - for_each_* iterators like for_each_vcpu

For the latter I think we want to stick to not mandating style
either way: There's already a fair amount of either of the two
legitimate forms. It's really a matter of personal taste whether
to consider these pseudo-keywords.

>> +This is unlike the Linux coding style and unlike K&R.  do/while loops
> There is extra space before "do/while".

No. In such documents it is quite common to have double blanks
after a full stop. See e.g. the original text, which had two
instances of this.

Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to