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

Re: [PATCH] xen/arm: pci: fix -Wtype-limits warning in pci-host-common.c



Hi,

On 04/05/2023 09:59, Bertrand Marquis wrote:
Hi Stewart,

On 3 May 2023, at 21:18, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx> wrote:

When building with EXTRA_CFLAGS_XEN_CORE="-Wtype-limits", we observe the
following warning:

arch/arm/pci/pci-host-common.c: In function ‘pci_host_common_probe’:
arch/arm/pci/pci-host-common.c:238:26: warning: comparison is always false due 
to limited range of data type [-Wtype-limits]
  238 |     if ( bridge->segment < 0 )
      |                          ^

This is due to bridge->segment being an unsigned type. Fix it by introducing a
new variable of signed type to use in the condition.

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>

I would see this as a bug fix more than a compiler warning fix as the error 
code was
ignored before that.

+1. Also there is a missing fixes tag. AFAICT this issue was introduced by 6ec9176d94ae.


Anyway:
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Just to clarify, you are happy with the current commit message? If so, I can commit it later on with the Reviewed-by + fixes tag.

Cheers,

--
Julien Grall



 


Rackspace

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