* [RFC] fixmap: change temp variable name
@ 2015-10-12 8:08 yalin wang
2015-10-12 9:05 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: yalin wang @ 2015-10-12 8:08 UTC (permalink / raw)
To: arnd, linux-arch, linux-kernel; +Cc: 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)
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
include/asm-generic/fixmap.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h
index 1cbb833..91ecaed 100644
--- a/include/asm-generic/fixmap.h
+++ b/include/asm-generic/fixmap.h
@@ -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) \
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC] fixmap: change temp variable name
2015-10-12 8:08 [RFC] fixmap: change temp variable name yalin wang
@ 2015-10-12 9:05 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2015-10-12 9:05 UTC (permalink / raw)
To: yalin wang; +Cc: arnd, linux-arch, linux-kernel
On Mon, 12 Oct 2015, yalin wang wrote:
> 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
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
> ---
> include/asm-generic/fixmap.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h
> index 1cbb833..91ecaed 100644
> --- a/include/asm-generic/fixmap.h
> +++ b/include/asm-generic/fixmap.h
> @@ -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) \
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arch" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-12 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 8:08 [RFC] fixmap: change temp variable name yalin wang
2015-10-12 9:05 ` Thomas Gleixner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.