All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <amc96@srcf.net>
To: Julien Grall <julien@xen.org>, Jan Beulich <jbeulich@suse.com>
Cc: sstabellini@kernel.org, stefanos@xilinx.com,
	Volodymyr_Babchuk@epam.com, bertrand.marquis@arm.com,
	Ayan Kumar Halder <ayankuma@xilinx.com>,
	andre.przywara@arm.com,
	Ayan Kumar Halder <ayan.kumar.halder@xilinx.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] bitops: Fix incorrect value in comment
Date: Wed, 1 Dec 2021 21:38:51 +0000	[thread overview]
Message-ID: <77a6b9b4-8117-e818-e68e-af37eeec2dd7@srcf.net> (raw)
In-Reply-To: <959d50ef-2a4c-8850-4a89-7eff0b649a13@xen.org>

On 01/12/2021 09:56, Julien Grall wrote:
> Hi,
>
> On 01/12/2021 09:38, Jan Beulich wrote:
>> On 01.12.2021 10:33, Julien Grall wrote:
>>> On 30/11/2021 18:12, Ayan Kumar Halder wrote:
>>>> --- a/xen/include/xen/bitops.h
>>>> +++ b/xen/include/xen/bitops.h
>>>> @@ -5,7 +5,7 @@
>>>>    /*
>>>>     * Create a contiguous bitmask starting at bit position @l and
>>>> ending at
>>>>     * position @h. For example
>>>> - * GENMASK(30, 21) gives us the 32bit vector 0x01fe00000.
>>>> + * GENMASK(30, 21) gives us the 32bit value 0x7fe00000.
>>>
>>> ... there are two extra changes here:
>>>     1) The bitmask is now described with 8-characters (rather than 9)
>>>     2) 'vector' is replaced with 'value'
>>>
>>> The former makes sense to me, but it is not clear to me why the latter
>>> should be changed.
>>
>> Would you mind explaining to me in which way you see "vector" accurately
>> describe the entity talked about?
>
> This can be seen as a vector of bit. I can see why people may think
> otherwise. However... if you think it doesn't describe it accurately,
> then I think this ought to be changed in Linux first (where the code
> and comment comes from).
>
>>
>> I also think the commit message is quite fine as is.
> IMHO, this is similar to when one do coding style change in a patch.
> They are unrelated but would be acceptable so long they are explained
> in the commit message.
>
> What I request is something like:
>
> "GENMASK(30, 21) should be 0x7fe00000 and only use 8-characters (it is
> a 32-bit comment). Fixed this in the comment.
>
> Take the opportunity to replace 'vector' with 'value' because..."
>
> This is simple enough and clarify what is the intent of the patch.

This is an unreasonable quantity of bikeshedding.  It's just a comment,
and a commit message of "fix the comment" is perfectly fine. 
Furthermore, the intent of the text is clear.

However, "32bit $WHATEVER" is also wrong because GENMASK() yields a
unsigned long constant.  Importantly, not 32 bits in an ARM64 build.


This trivial patch has lingered far too long.  I have committed it,
along with an adjustment.  Further bikeshedding will be redirected to
/dev/null.

~Andrew


  reply	other threads:[~2021-12-01 21:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 18:12 [PATCH v2] bitops: Fix incorrect value in comment Ayan Kumar Halder
2021-12-01  7:21 ` Jan Beulich
2021-12-01  8:40 ` Bertrand Marquis
2021-12-01  9:33 ` Julien Grall
2021-12-01  9:38   ` Jan Beulich
2021-12-01  9:56     ` Julien Grall
2021-12-01 21:38       ` Andrew Cooper [this message]
2021-12-02  9:05         ` Julien Grall

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=77a6b9b4-8117-e818-e68e-af37eeec2dd7@srcf.net \
    --to=amc96@srcf.net \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andre.przywara@arm.com \
    --cc=ayan.kumar.halder@xilinx.com \
    --cc=ayankuma@xilinx.com \
    --cc=bertrand.marquis@arm.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=stefanos@xilinx.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.