Skip to contentSkip to conversation

arm64: memory: Add missing brackets to untagged_addr() macro

PATCH New Will Deacon 1 participant 1 message Feb 19, 2020

Subsystems (2)
lore
Share & tools
lore

Will Deacon

author maintainer
#0 lore raw

PATCH 1/1 arm64: memory: Add missing brackets to untagged_addr() macro

Add brackets around the evaluation of the 'addr' parameter to the untagged_addr() macro so that the case to 'u64' applies to the result of the expression.

Fixes 597399d0cb91 ("arm64: tags: Preserve tags for addresses translated via TTBR1")
---
 arch/arm64/include/asm/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/memory.h +1 -1
index a4f9ca5479b0..4d94676e5a8b 100644
@@ -213,7 +213,7 @@ static inline unsigned long kaslr_offset(void)
 	((__force __typeof__(addr))sign_extend64((__force u64)(addr), 55))
 
 #define untagged_addr(addr)	({					\
-	u64 __addr = (__force u64)addr;					\
+	u64 __addr = (__force u64)(addr);					\
 	__addr &= __untagged_addr(__addr);				\
 	(__force __typeof__(addr))__addr;				\
 })
Signature · 1 line
2.25.0.265.gbab2e86ba0-goog