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

Re: [PATCH 2/3] xen/arm: vgic: Use 'unsigned int' rather than 'int' whenever it is possible


  • To: Julien Grall <julien@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 18 Aug 2023 01:50:05 +0000
  • Accept-language: zh-CN, 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=xARfuKSEikcDT+BGaxiuHbLcZ2Tc1ArbK6FKKiV4mxg=; b=OMNCymg6C1uoTc5rAXG6txIk+DPExP8a86nZDYu1Yd2mHJoXvGnoa72NIqr1rTGxIAyZHW8q5jrtjAxg9s//gVhtFcN1lVZZVHDsb+Z9gwPMH119xbHBejA2lsm7p3vyo9OFllz/Re1V54b25YPWV34TTMJH4UBETayAsRbkbLEmnre/reG2Y7MVJ8zR7GkMhOHupFMsAxUl9qkjbZ/RzO5I0kc/GYSeyLXQvH1xmRzR153J53nuuTswP/g27HFUmbYxmCfDWv6LW5GVURD+404KvNntURMu5Id7D2ai2GhbE0V/nAxQKVo7HazUayIBxYsO2vara03Y/fB9CGfrPQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Io/vA+dvgNk9Jo4fh8mXJbRoBltkOdFG19D6mA6v7+9kx+ZqvFRfj9B1rH0LVaitA7gd5HAbdSVN8O7WNCeMv07Yi7JcqPNGnqPCoEz7/6kJA0q0mSN/KWwjcUpcbr5qW+57lzsL9nrP9tXSVZkRCKXHix+Irf8qEhIQFmxJ4qeAbjhoEPMgL7TOf1MtkUjb7FnapxxQTOzMtY2S0DiuusDfV7nCY4MBgxW19gqwLFcxgtThthEIpmxUIzZPNlgnccYjbMwEAobO1ty10fIf8o2lOsLPmufJXVPf/ZRcXXzAicpVpLCz22t6R9qRkjmtwDD7kPHk27NzbhNwL3bkRg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 18 Aug 2023 01:50:21 +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: AQHZ0VP+MXsKRsPsX0GU2DhsArPDyK/vSekA
  • Thread-topic: [PATCH 2/3] xen/arm: vgic: Use 'unsigned int' rather than 'int' whenever it is possible

Hi Julien,

> On Aug 18, 2023, at 05:43, Julien Grall <julien@xxxxxxx> wrote:
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> Switch to unsigned int for the return/parameters of the following
> functions:
>    * REG_RANK_NR(): 'b' (number of bits) and the return is always positive.
>      'n' doesn't need to be size specific.
>    * vgic_rank_offset(): 'b' (number of bits), 'n' (register index),
>      's' (size of the access) are always positive.
>    * vgic_{enable, disable}_irqs(): 'n' (rank index) is always positive
>    * vgic_get_virq_type(): 'n' (rank index) and 'index' (register
>      index) are always positive.
> 
> Take the opportunity to propogate the unsignedness to the local
> variable used for the arguments.
> 
> This will remove some of the warning reported by GCC 12.2.1 when
> passing the flags -Wsign-conversion/-Wconversion.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>
Tested-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry




 


Rackspace

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