From: Tao Xu <tao3.xu@intel.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"ehabkost@redhat.com" <ehabkost@redhat.com>,
"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] target/i386: Correct extra enter and spaces in comment
Date: Fri, 20 Sep 2019 08:55:49 +0800 [thread overview]
Message-ID: <327cd301-f98c-c097-47aa-b85a70c4490d@intel.com> (raw)
In-Reply-To: <03994df5-69b7-8663-fc19-0f551a9b29d6@redhat.com>
On 9/19/2019 5:41 PM, Philippe Mathieu-Daudé wrote:
> Hi Tao,
>
> On 9/19/19 4:06 AM, Tao Xu wrote:
>> There is an extra line in comment of CPUID_8000_0008_EBX_WBNOINVD,
>> remove the extra enter and spaces.
>>
>> Signed-off-by: Tao Xu <tao3.xu@intel.com>
>> ---
>> target/i386/cpu.h | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
>> index 5f6e3a029a..71b6193390 100644
>> --- a/target/i386/cpu.h
>> +++ b/target/i386/cpu.h
>> @@ -695,8 +695,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
>>
>> #define CPUID_7_1_EAX_AVX512_BF16 (1U << 5) /* AVX512 BFloat16 Instruction */
>>
>> -#define CPUID_8000_0008_EBX_WBNOINVD (1U << 9) /* Write back and
>> - do not invalidate cache */
>> +#define CPUID_8000_0008_EBX_WBNOINVD (1U << 9) /* Write back and do not invalidate cache */
>
> The QEMU CODING_STYLE [*] recommend a 80 chars per line limit:
>
> Line width
> ==========
>
> Lines should be 80 characters; try not to make them longer.
>
> Sometimes it is hard to do, especially when dealing with QEMU subsystems
> that use long function or symbol names. Even in that case, do not make
> lines much longer than 80 characters.
>
> Rationale:
>
> * Some people like to tile their 24" screens with a 6x4 matrix of 80x24
> xterms and use vi in all of them. The best way to punish them is to
> let them keep doing it.
> * Code and especially patches is much more readable if limited to a sane
> line length. Eighty is traditional.
> * The four-space indentation makes the most common excuse ("But look
> at all that white space on the left!") moot.
> * It is the QEMU coding style.
>
> [*]
> https://git.qemu.org/?p=qemu.git;a=blob;f=CODING_STYLE.rst;h=427699e0e425431ea99d4046e40543bdcc22e9c5;hb=HEAD#l82
>
> Can you repost using correct lenght comments?
Yes, But it is hard to do and in this header file there are lots of
lines over 80 chars even 90 chars. So how about I correct all the lines
over 80 like this:
/* Write back and do not invalidate cache */
#define CPUID_8000_0008_EBX_WBNOINVD (1U << 9)
/* Indirect Branch Prediction Barrier */
#define CPUID_8000_0008_EBX_IBPB (1U << 12)
>
>> #define CPUID_8000_0008_EBX_IBPB (1U << 12) /* Indirect Branch Prediction Barrier */
>>
>> #define CPUID_XSAVE_XSAVEOPT (1U << 0)
>>
next prev parent reply other threads:[~2019-09-20 0:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-19 2:06 [Qemu-devel] [PATCH] target/i386: Correct extra enter and spaces in comment Tao Xu
2019-09-19 9:41 ` Philippe Mathieu-Daudé
2019-09-20 0:55 ` Tao Xu [this message]
2019-09-19 19:15 ` no-reply
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=327cd301-f98c-c097-47aa-b85a70c4490d@intel.com \
--to=tao3.xu@intel.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).