lkml.org 
[lkml]   [2021]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] xen: Fix implicit type conversion
From

On 10/26/21 5:59 AM, Jiamei Xie wrote:
>
>> -----Original Message-----
>> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of
>> Juergen Gross
>> Sent: 2021年10月26日 15:36
>> To: Jiasheng Jiang <jiasheng@iscas.ac.cn>; boris.ostrovsky@oracle.com;
>> sstabellini@kernel.org
>> Cc: xen-devel@lists.xenproject.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v2] xen: Fix implicit type conversion
>>
>> On 26.10.21 09:32, Jiasheng Jiang wrote:
>>> The variable 'i' is defined as UINT.
>>> However in the for_each_possible_cpu, its value is assigned to -1.
>>> That doesn't make sense and in the cpumask_next() it is implicitly
>>> type conversed to INT.
>>> It is universally accepted that the implicit type conversion is
>>> terrible.
>>> Also, having the good programming custom will set an example for
>>> others.
>>> Thus, it might be better to change the definition of 'i' from UINT
>>> to INT.
>>>
>>> Fixes: 3fac101 ("xen: Re-upload processor PM data to hypervisor after S3
>> resume (v2)")
>>> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
>> Reviewed-by: Juergen Gross <jgross@suse.com>
>>
>>
>> Juergen
> [Jiamei Xie]
> Reviewed-by: Jiamei Xie <jiamei.xie@arm.com>



Applied to for-linus-5.16


-boris

\
 
 \ /
  Last update: 2021-10-27 15:23    [W:0.068 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site