[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 4/6] xen: Switch to byteswap


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 17 May 2022 16:59:24 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uyenm/uJg5Mvz9eegPGcCmFUkYK6jbI7OTfX9pAB8tQ=; b=JyJxsk9Jn1OuBK3UMW3Rr58HmVQcf5ha65qC1+mGcoQOyfyhOgAGAbIvLIJj13VIjQV3SOW/zySTF6SQAMBHLCEAQWDmZyfe34ngtTMxV+cb4UWUpXdjJbnbrFMJfD8DoMNYejc54U9phygdKT6JKOcOKksbUL5INTI90wFuZ3kS48PwoanuikwGf2fUcM9f93t4Jhg8Z7tN9e7NNjmTcpwFsKXD53PQxC6QSnOd801vgJ+iG1uu3E7pDXIbWxKggTLZEgtqV2iBxNhZeJRF4IQIeva2rnZ4VyxpYKbRkgDn2XMF1treTfMzZzlcd6FzXxwGi/1/6Dm6/p9NZh7AKg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ODg/3Ej9C5sUBs49/wQs4tb+66WWVuu0MkpcvzxT4+qGIiCdlRu5TJUDQE+KRKgb3pjNk/c7N0cAI7MVzncneT07tJCKRG9gENyQuHGwlV9e6XtnqZe6m8yBO9j46mr/7kyz+w687OsNa2tGfDKSoEJpoT+74oDxzxqTHZJXmhm6oCnNVn1cZX4ZocyafRA+FEZDZlPbFYe2mgML/4j3wTI8h0Zovbs85Ljr8RynnO5dlj6Xe9YOLlDc37VvwG5hsgPVRZrn8n12O7KSuSZ5pUoNxHXiE1GUuHxjhcmM3bIRR1YEs9TRo5HZLlo5vysgK/XalBDilf4rx7jh1NPbkA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Lin Liu (刘林) <lin.liu@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 17 May 2022 14:59:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.05.2022 16:21, Bertrand Marquis wrote:
>> On 11 May 2022, at 13:11, George Dunlap <george.dunlap@xxxxxxxxxx> wrote:
>>> On May 11, 2022, at 9:34 AM, Julien Grall <julien@xxxxxxx> 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.