All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henry Wang <Henry.Wang@arm.com>
To: Julien Grall <julien@xen.org>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Julien Grall <jgrall@amazon.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <Bertrand.Marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH 2/3] xen/arm: vgic: Use 'unsigned int' rather than 'int' whenever it is possible
Date: Fri, 18 Aug 2023 01:50:05 +0000	[thread overview]
Message-ID: <B7314632-8E2D-4C7C-B23C-5D8FB54A15E2@arm.com> (raw)
In-Reply-To: <20230817214356.47174-3-julien@xen.org>

Hi Julien,

> On Aug 18, 2023, at 05:43, Julien Grall <julien@xen.org> wrote:
> 
> From: Julien Grall <jgrall@amazon.com>
> 
> 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@amazon.com>

Reviewed-by: Henry Wang <Henry.Wang@arm.com>
Tested-by: Henry Wang <Henry.Wang@arm.com>

Kind regards,
Henry



  parent reply	other threads:[~2023-08-18  1:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 21:43 [PATCH 0/3] xen/arm: Some clean-up found with -Wconversion and -Warith-conversion Julien Grall
2023-08-17 21:43 ` [PATCH 1/3] xen/arm: vmmio: The number of entries cannot be negative Julien Grall
2023-08-17 22:57   ` Stefano Stabellini
2023-08-18  1:49   ` Henry Wang
2023-08-17 21:43 ` [PATCH 2/3] xen/arm: vgic: Use 'unsigned int' rather than 'int' whenever it is possible Julien Grall
2023-08-17 23:04   ` Stefano Stabellini
2023-08-21 16:59     ` Julien Grall
2023-08-18  1:50   ` Henry Wang [this message]
2023-08-18  7:02   ` Michal Orzel
2023-08-21 17:00     ` Julien Grall
2023-08-17 21:43 ` [PATCH 3/3] xen/public: arch-arm: All PSR_* defines should be unsigned Julien Grall
2023-08-17 23:05   ` Stefano Stabellini
2023-08-18  1:50   ` Henry Wang
2023-08-18  6:33   ` Jan Beulich
2023-08-18  7:39     ` Julien Grall
2023-08-18  8:00       ` Juergen Gross
2023-08-18  8:05         ` Julien Grall
2023-08-18  8:25           ` Juergen Gross
2023-08-18  9:15             ` Julien Grall
2023-08-18  8:14       ` Jan Beulich
2023-08-18  9:21         ` Julien Grall
2023-08-21 17:05 ` [PATCH 0/3] xen/arm: Some clean-up found with -Wconversion and -Warith-conversion Julien Grall

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=B7314632-8E2D-4C7C-B23C-5D8FB54A15E2@arm.com \
    --to=henry.wang@arm.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jgrall@amazon.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.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.