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

RE: [PATCH v2] xen: Fix implicit type conversion


  • To: Juergen Gross <jgross@xxxxxxxx>, Jiasheng Jiang <jiasheng@xxxxxxxxxxx>, "boris.ostrovsky@xxxxxxxxxx" <boris.ostrovsky@xxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>
  • From: Jiamei Xie <Jiamei.Xie@xxxxxxx>
  • Date: Tue, 26 Oct 2021 09:59:34 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=7Cm63ANI/4WQOOYL0nfpEe0BCVUOgAcGdQS0zt2itOs=; b=VrQ+7iXJqx0l845Ybw104crtBEQsl+uOqPbAbGmeNJYz1jzkRKjRTXdYx+Dpc/r29dIkX+hd08MASKdxSNjhjrArVMWPqqtMjZ4+DshuvtgM+P4V5/WYxUuVuVBEd9fCx3n+N5C9MzIMVGhJ1wdd/kAYhnEgIAcBHxhfLDixRnSapslklGJbrOMOAi7LMbCVf+g0P36wN4ecSH5267VucUmZY71SMy5Sqi0kVOQSBRPZ6+paWgQczNK8bCHnIDtybZt+rl1NAKI3aDQGqtgjxnXoFf1jKjOHtTlydo1iqBQWpkbEuilAzLlzM6guHEeHURfnhi9IENmNvpZoR6vGYg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QBNuaObu/dVDJ1wihGLYfTQPvbL7cA4WxPdGQEQjiSJhMtt6VY8d/yj2VEY06fMxk/Xzi35REFaz3YrBlXjAS0qxHIE5gE61XVonfnD1Wz2vsfTQ3H15YRRPg5A4oEK/y6LMUyTJHLGGj69s0e7StNqao0MXzHSc48rjAHoWLe9xf2LIpLkzwjRepzptMaX/CesDxUtIiogSZVbVKCNRB4uNdzXdcGw4oNY2s95xzSu/HBDOrEJk5WMFJMnwOHPymCp8+M5vK08ZOBPJC2MBYHp+RrqXYL8KD73fm30WBUrSROGpK7OF6aABrdbj6mufpLUnZE1Kzx9/GtLrMFN7/A==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 26 Oct 2021 10:00:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXyjurcY7tN33IlE6GkuPKa9q2jKvk4+KAgAAnZaA=
  • Thread-topic: [PATCH v2] xen: Fix implicit type conversion


> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Juergen Gross
> Sent: 2021年10月26日 15:36
> To: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>; boris.ostrovsky@xxxxxxxxxx;
> sstabellini@xxxxxxxxxx
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxx>
> 
> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
> 
> 
> Juergen

[Jiamei Xie] 
Reviewed-by: Jiamei Xie <jiamei.xie@xxxxxxx>


 


Rackspace

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