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

[Xen-changelog] [xen master] xen/arm: Surround HSR_SYSREG macro value with ()



commit ac2d8d402370f6f93f82871f3b34ddb9a9ccae05
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Wed Nov 29 17:46:35 2017 +0000
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Fri Dec 8 13:15:41 2017 -0800

    xen/arm: Surround HSR_SYSREG macro value with ()
    
    The value of the macro HCR_SYSREG is not surrounded by (). This means
    the behavior may change depend on how it is used.
    
    Thanksfully recent GCC will issue a warning for that.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/include/asm-arm/arm64/sysregs.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/include/asm-arm/arm64/sysregs.h 
b/xen/include/asm-arm/arm64/sysregs.h
index 084d2a1..1811234 100644
--- a/xen/include/asm-arm/arm64/sysregs.h
+++ b/xen/include/asm-arm/arm64/sysregs.h
@@ -32,11 +32,11 @@
 
 /* These are used to decode traps with HSR.EC==HSR_EC_SYSREG */
 #define HSR_SYSREG(op0,op1,crn,crm,op2) \
-    ((__HSR_SYSREG_##op0) << HSR_SYSREG_OP0_SHIFT) | \
-    ((__HSR_SYSREG_##op1) << HSR_SYSREG_OP1_SHIFT) | \
-    ((__HSR_SYSREG_##crn) << HSR_SYSREG_CRN_SHIFT) | \
-    ((__HSR_SYSREG_##crm) << HSR_SYSREG_CRM_SHIFT) | \
-    ((__HSR_SYSREG_##op2) << HSR_SYSREG_OP2_SHIFT)
+    (((__HSR_SYSREG_##op0) << HSR_SYSREG_OP0_SHIFT) | \
+     ((__HSR_SYSREG_##op1) << HSR_SYSREG_OP1_SHIFT) | \
+     ((__HSR_SYSREG_##crn) << HSR_SYSREG_CRN_SHIFT) | \
+     ((__HSR_SYSREG_##crm) << HSR_SYSREG_CRM_SHIFT) | \
+     ((__HSR_SYSREG_##op2) << HSR_SYSREG_OP2_SHIFT))
 
 #define HSR_SYSREG_DCISW          HSR_SYSREG(1,0,c7,c6,2)
 #define HSR_SYSREG_DCCSW          HSR_SYSREG(1,0,c7,c10,2)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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