xen/arm: smmu-v3: Fix MISRA C 2012 Rule 1.3 violations
authorXenia Ragiadakou <burzalodowa@gmail.com>
Tue, 28 Jun 2022 15:08:51 +0000 (18:08 +0300)
committerStefano Stabellini <stefano.stabellini@amd.com>
Wed, 29 Jun 2022 00:41:27 +0000 (17:41 -0700)
commit93aa071f66b78a2abbf134aeb96b02f066e6091d
tree4de588bcf877dd67ca5122e2b9712c099f71383c
parent8c99264c6746541ddbfd7afec533e6ad1c8c41a5
xen/arm: smmu-v3: Fix MISRA C 2012 Rule 1.3 violations

The expression 1 << 31 produces undefined behaviour because the type of integer
constant 1 is (signed) int and the result of shifting 1 by 31 bits is not
representable in the (signed) int type.
Change the type of 1 to unsigned int by adding the U suffix.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
xen/drivers/passthrough/arm/smmu-v3.c