Skip to contentSkip to conversation

fixmap: change temp variable name

RFC In review yalin wang 2 participants 2 messages Oct 12, 2015 Generic include/asm header files

lore
Share & tools
lore

yalin wang

author
#0 lore raw

RFC 1/1 fixmap: change temp variable name

Change temp variable name addr to ____addr, so that not conflict with the caller's variable name, it will build error if call like this:
__set_fixmap_offset(idx, addr, flags)

---
 include/asm-generic/fixmap.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/asm-generic/fixmap.h +3 -3
index 1cbb833..91ecaed 100644
@@ -72,10 +72,10 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
 /* Return a pointer with offset calculated */
 #define __set_fixmap_offset(idx, phys, flags)		      \
 ({							      \
-	unsigned long addr;				      \
+	unsigned long ____addr;				      \
 	__set_fixmap(idx, phys, flags);			      \
-	addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \
-	addr;						      \
+	____addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \
+	____addr;						      \
 })
 
 #define set_fixmap_offset(idx, phys) \
Signature · 1 line
1.9.1
#1 lore raw
Quoted 4 lines · yalin wang

Change temp variable name addr to ____addr, so that not conflict with the caller's variable name, it will build error if call like this:
__set_fixmap_offset(idx, addr, flags)

Can't we just use inlines to avoid this kind of crap?

Thanks,

tglx

Quoted 31 lines
---
 include/asm-generic/fixmap.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/asm-generic/fixmap.h +3 -3
index 1cbb833..91ecaed 100644
@@ -72,10 +72,10 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
 /* Return a pointer with offset calculated */
 #define __set_fixmap_offset(idx, phys, flags)		      \
 ({							      \
-	unsigned long addr;				      \
+	unsigned long ____addr;				      \
 	__set_fixmap(idx, phys, flags);			      \
-	addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \
-	addr;						      \
+	____addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \
+	____addr;						      \
 })
 
 #define set_fixmap_offset(idx, phys) \
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html