All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Bertrand Marquis <Bertrand.Marquis@arm.com>,
	George Dunlap <george.dunlap@citrix.com>
Cc: "Julien Grall" <julien@xen.org>,
	"Lin Liu (刘林)" <lin.liu@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Andrew Cooper" <Andrew.Cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>
Subject: Re: [PATCH v3 4/6] xen: Switch to byteswap
Date: Tue, 17 May 2022 16:59:24 +0200	[thread overview]
Message-ID: <c5738e41-c1f7-0ad2-b36f-541403701cea@suse.com> (raw)
In-Reply-To: <C03D33C9-1E28-4119-989A-B7294F2E0CCF@arm.com>

On 11.05.2022 16:21, Bertrand Marquis wrote:
>> On 11 May 2022, at 13:11, George Dunlap <george.dunlap@citrix.com> wrote:
>>> On May 11, 2022, at 9:34 AM, Julien Grall <julien@xen.org> wrote:
>>> On 11/05/2022 07:30, Lin Liu (刘林) wrote:
>>>> On 10/05/2022 11:15, Lin Liu wrote:
>>>>> static inline void put_unaligned_be16(uint16_t val, void *p)
>>>>> {
>>>>> - *(__force __be16*)p = cpu_to_be16(val);
>>>>> + *(__be16 *)p = cpu_to_be16(val);
>>>>>> Why did you drop the __force?
>>>> Google told me __force is used in linux kernel to suppress warning in sparse,
>>>> https://stackoverflow.com/questions/53120610/what-does-the-attribute-force-do
>>>> Is sparse also used in xen?
>>>
>>> I am not aware of any use of Sparse in Xen, but it would technically be possible.
>>>
>>> However, my point here is more that this change seems to be unrelated to what the patch is meant to do (i.e. switching to byteswap). So if it is unnecessary, then it should be dropped from this patch.
>>
>> I think making people pull little changes like this out into separate patches is asking too much. It’s a lot of extra effort on the part of the submitter for basically no value. We commonly do little clean-ups like this in patches, and just require a comment at the bottom, like this:
>>
>> 8<—
>>
>> While here:
>> - Drop ‘_force’ keyword, which is only needed when running the Sparse analysis tool
>>
>> —>8
>>
>> I do agree that minor changes like this need to be described, so that people 5 years from now have some hope of figuring out what’s going on.
> 
> I fully agree here. The effort involved by splitting a patch in several ones (both for the
> contributor and the maintainers) means it should be prevented unless the original patch
> could not be reviewed as is (patch to long or to complex to test for example but there
> might be other valid cases).

This is fine for uncontroversial changes, but not in cases like this
one. Like Julien, I think we should rather strive towards completing
the Linux-inherited annotations like __force. Even without the actual
use of sparse they serve a documentation purpose.

Jan



  reply	other threads:[~2022-05-17 14:59 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 10:15 [PATCH v3 0/6] Implement byteswap and update references Lin Liu
2022-05-10 10:15 ` [PATCH v3 1/6] xen: implement byteswap Lin Liu
2022-05-10 10:50   ` Andrew Cooper
2022-05-10 11:10   ` Julien Grall
2022-05-10 12:10     ` Lin Liu (刘林)
2022-05-10 16:18       ` Julien Grall
2022-05-10 10:15 ` [PATCH v3 2/6] crypto/vmac: Simplify code with byteswap Lin Liu
2022-05-10 10:51   ` Andrew Cooper
2022-05-10 10:15 ` [PATCH v3 3/6] arm64/find_next_bit: Remove ext2_swab() Lin Liu
2022-05-10 10:52   ` Andrew Cooper
2022-05-10 11:05   ` Julien Grall
2022-05-10 10:15 ` [PATCH v3 4/6] xen: Switch to byteswap Lin Liu
2022-05-10 10:51   ` Julien Grall
2022-05-10 11:09     ` Andrew Cooper
2022-05-10 11:17       ` Julien Grall
2022-05-10 11:34         ` Andrew Cooper
2022-05-10 11:47           ` Julien Grall
2022-05-11  3:12             ` Stefano Stabellini
2022-05-11  8:21               ` Julien Grall
2022-05-11 14:16               ` Bertrand Marquis
2022-05-11  9:56             ` Andrew Cooper
2022-05-11 10:55               ` Julien Grall
2022-05-11  6:30     ` Lin Liu (刘林)
2022-05-11  8:34       ` Julien Grall
2022-05-11 12:11         ` George Dunlap
2022-05-11 12:39           ` Julien Grall
2022-05-11 14:21           ` Bertrand Marquis
2022-05-17 14:59             ` Jan Beulich [this message]
2022-05-10 14:32   ` Anthony PERARD
2022-05-10 10:15 ` [PATCH v3 5/6] byteorder: Remove byteorder Lin Liu
2022-05-10 11:09   ` Andrew Cooper
2022-05-10 10:15 ` [PATCH v3 6/6] tools: Remove unnecessary header Lin Liu
2022-05-17 15:01   ` Jan Beulich
2022-05-17 15:18     ` 回复: " Lin Liu (刘林)

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=c5738e41-c1f7-0ad2-b36f-541403701cea@suse.com \
    --to=jbeulich@suse.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien@xen.org \
    --cc=lin.liu@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --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.