[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH 2/2] CODING_STYLE: indent example
From: |
Wei Yang |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH 2/2] CODING_STYLE: indent example code as all others |
Date: |
Tue, 19 Feb 2019 22:20:28 +0000 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Tue, Feb 19, 2019 at 07:55:31PM +0100, Philippe Mathieu-Daudé wrote:
>On 2/19/19 6:56 PM, Eric Blake wrote:
>> On 2/19/19 11:38 AM, Philippe Mathieu-Daudé wrote:
>>
>>>> + if (a == 1) {
>>>> + /* Reads like: "If a equals 1" */
>>>
>>> I guess you found a bug in the documentation :)
>>>
>>> Since 8c06fbdf36bf4d the style asked is:
>>>
>>> We now require Linux-kernel-style multiline comments:
>>> /*
>>> * line one
>>> * line two
>>> */
>>>
>>>> + do_something();
>>
>> We only require winged multiline comments when the comment is actually
>> multiline. In this case, the comment is a one-liner, and is just fine
>> as written.
>
>Hmm I have a series where I moved code and changed from /* one line */
>to the multi-line style, I wonder why and remember checkpatch errors.
>Maybe a side-effect from what b94e809d3e fixed.
>
>Anyway, Wei do you mind adding a multi-line example here too?
>
A multi-line example for multiline comments?
This looks not relavant to this sectioin. I am afraid I will not add
this example here. Sorry for that.
>With/without multi-line example:
>Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
>
>Thanks!
>
>Phil.
--
Wei Yang
Help you, Help me
Re: [Qemu-trivial] [Qemu-devel] [PATCH 2/2] CODING_STYLE: indent example code as all others, Eric Blake, 2019/02/19