diff mbox

[v2,1/4] xen/arm: fix GIC_INVALID_LR

Message ID 1482372913-18366-1-git-send-email-sstabellini@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Stefano Stabellini Dec. 22, 2016, 2:15 a.m. UTC
GIC_INVALID_LR should be 0xff, but actually, defined as ~(uint8_t)0, is
0xffffffff. Fix the problem by placing the ~ operator before the cast.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/include/asm-arm/vgic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Julien Grall Dec. 28, 2016, 5:30 p.m. UTC | #1
Hi Stefano,

On 22/12/16 02:15, Stefano Stabellini wrote:
> GIC_INVALID_LR should be 0xff, but actually, defined as ~(uint8_t)0, is
> 0xffffffff. Fix the problem by placing the ~ operator before the cast.
>
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>

Reviewed-by: Julien Grall <julien.grall@arm.com>

Regards,
Stefano Stabellini Jan. 3, 2017, 10:52 p.m. UTC | #2
On Wed, 28 Dec 2016, Julien Grall wrote:
> Hi Stefano,
> 
> On 22/12/16 02:15, Stefano Stabellini wrote:
> > GIC_INVALID_LR should be 0xff, but actually, defined as ~(uint8_t)0, is
> > 0xffffffff. Fix the problem by placing the ~ operator before the cast.
> > 
> > Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> Reviewed-by: Julien Grall <julien.grall@arm.com>

Thanks, I committed the fix
diff mbox

Patch

diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h
index 672f649..467333c 100644
--- a/xen/include/asm-arm/vgic.h
+++ b/xen/include/asm-arm/vgic.h
@@ -69,7 +69,7 @@  struct pending_irq
     unsigned long status;
     struct irq_desc *desc; /* only set it the irq corresponds to a physical irq */
     unsigned int irq;
-#define GIC_INVALID_LR         ~(uint8_t)0
+#define GIC_INVALID_LR         (uint8_t)~0
     uint8_t lr;
     uint8_t priority;
     /* inflight is used to append instances of pending_irq to