From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Eric Blake <eblake@redhat.com>,
Wei Yang <richardw.yang@linux.intel.com>,
qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: imammedo@redhat.com, mjt@tls.msk.ru
Subject: Re: [Qemu-devel] [PATCH 2/2] CODING_STYLE: indent example code as all others
Date: Tue, 19 Feb 2019 19:55:31 +0100 [thread overview]
Message-ID: <2e584c55-5b40-4a29-b0ae-e53039e38a7d@redhat.com> (raw)
In-Reply-To: <77cf32b1-6a4a-33c5-4b3c-8ba3245a4b23@redhat.com>
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?
With/without multi-line example:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Thanks!
Phil.
next prev parent reply other threads:[~2019-02-19 18:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 1:31 [Qemu-devel] [PATCH 0/2] CODING_STYLE: trivial update Wei Yang
2019-02-19 1:31 ` [Qemu-devel] [PATCH 1/2] CODING_STYLE: specify the indent rule for multiline code Wei Yang
2019-02-19 17:34 ` Philippe Mathieu-Daudé
2019-02-19 17:55 ` Eric Blake
2019-02-19 22:03 ` Wei Yang
2019-02-19 17:52 ` Eric Blake
2019-02-19 22:04 ` Wei Yang
2019-02-19 1:31 ` [Qemu-devel] [PATCH 2/2] CODING_STYLE: indent example code as all others Wei Yang
2019-02-19 17:38 ` Philippe Mathieu-Daudé
2019-02-19 17:56 ` Eric Blake
2019-02-19 18:55 ` Philippe Mathieu-Daudé [this message]
2019-02-19 22:20 ` Wei Yang
2019-02-19 23:55 ` Philippe Mathieu-Daudé
2019-02-19 22:05 ` Wei Yang
2019-02-19 17:57 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e584c55-5b40-4a29-b0ae-e53039e38a7d@redhat.com \
--to=philmd@redhat.com \
--cc=eblake@redhat.com \
--cc=imammedo@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=richardw.yang@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).