diff options
author | Tilman Schmidt <tilman@imap.cc> | 2007-02-10 04:45:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:31 -0500 |
commit | 16cf5b39b81b95d1e3d81df3ba8c82cadf54f551 (patch) | |
tree | b8fa1ee5fb548073f0265015bff15f7ebb3833cb | |
parent | 3db5db4fcdafc85b99d171336a7d2f25765ccd13 (diff) |
[PATCH] fix sparse warnings from {asm,net}/checksum.h
Rename the variable "sum" in the __range_ok macros to avoid name collisions
causing lots of "symbol shadows an earlier one" warnings by sparse.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Andi Kleen <ak@suse.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/asm-arm/uaccess.h | 4 | ||||
-rw-r--r-- | include/asm-arm26/uaccess-asm.h | 4 | ||||
-rw-r--r-- | include/asm-i386/uaccess.h | 4 | ||||
-rw-r--r-- | include/asm-m32r/uaccess.h | 4 | ||||
-rw-r--r-- | include/asm-x86_64/uaccess.h | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index 5f420a0149f1..c92df958802e 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h | |||
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs) | |||
76 | 76 | ||
77 | /* We use 33-bit arithmetic here... */ | 77 | /* We use 33-bit arithmetic here... */ |
78 | #define __range_ok(addr,size) ({ \ | 78 | #define __range_ok(addr,size) ({ \ |
79 | unsigned long flag, sum; \ | 79 | unsigned long flag, roksum; \ |
80 | __chk_user_ptr(addr); \ | 80 | __chk_user_ptr(addr); \ |
81 | __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ | 81 | __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ |
82 | : "=&r" (flag), "=&r" (sum) \ | 82 | : "=&r" (flag), "=&r" (roksum) \ |
83 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | 83 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ |
84 | : "cc"); \ | 84 | : "cc"); \ |
85 | flag; }) | 85 | flag; }) |
diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h index 19f798e338c9..ade76ec02995 100644 --- a/include/asm-arm26/uaccess-asm.h +++ b/include/asm-arm26/uaccess-asm.h | |||
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | #define __range_ok(addr,size) ({ \ | 36 | #define __range_ok(addr,size) ({ \ |
37 | unsigned long flag, sum; \ | 37 | unsigned long flag, roksum; \ |
38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ | 38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ |
39 | : "=&r" (flag), "=&r" (sum) \ | 39 | : "=&r" (flag), "=&r" (roksum) \ |
40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | 40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ |
41 | : "cc"); \ | 41 | : "cc"); \ |
42 | flag; }) | 42 | flag; }) |
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index eef5133b9ce2..70829ae3ad52 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h | |||
@@ -54,10 +54,10 @@ extern struct movsl_mask { | |||
54 | * This needs 33-bit arithmetic. We have a carry... | 54 | * This needs 33-bit arithmetic. We have a carry... |
55 | */ | 55 | */ |
56 | #define __range_ok(addr,size) ({ \ | 56 | #define __range_ok(addr,size) ({ \ |
57 | unsigned long flag,sum; \ | 57 | unsigned long flag,roksum; \ |
58 | __chk_user_ptr(addr); \ | 58 | __chk_user_ptr(addr); \ |
59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ | 59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ |
60 | :"=&r" (flag), "=r" (sum) \ | 60 | :"=&r" (flag), "=r" (roksum) \ |
61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ | 61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ |
62 | flag; }) | 62 | flag; }) |
63 | 63 | ||
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 26e978c7e3b4..bd8c83765a5c 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s) | |||
68 | * This needs 33-bit arithmetic. We have a carry... | 68 | * This needs 33-bit arithmetic. We have a carry... |
69 | */ | 69 | */ |
70 | #define __range_ok(addr,size) ({ \ | 70 | #define __range_ok(addr,size) ({ \ |
71 | unsigned long flag, sum; \ | 71 | unsigned long flag, roksum; \ |
72 | __chk_user_ptr(addr); \ | 72 | __chk_user_ptr(addr); \ |
73 | asm ( \ | 73 | asm ( \ |
74 | " cmpu %1, %1 ; clear cbit\n" \ | 74 | " cmpu %1, %1 ; clear cbit\n" \ |
@@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s) | |||
76 | " subx %0, %0\n" \ | 76 | " subx %0, %0\n" \ |
77 | " cmpu %4, %1\n" \ | 77 | " cmpu %4, %1\n" \ |
78 | " subx %0, %5\n" \ | 78 | " subx %0, %5\n" \ |
79 | : "=&r" (flag), "=r" (sum) \ | 79 | : "=&r" (flag), "=r" (roksum) \ |
80 | : "1" (addr), "r" ((int)(size)), \ | 80 | : "1" (addr), "r" ((int)(size)), \ |
81 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ | 81 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ |
82 | : "cbit" ); \ | 82 | : "cbit" ); \ |
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index c0eac519840b..8079e29c14fd 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h | |||
@@ -37,11 +37,11 @@ | |||
37 | * Uhhuh, this needs 65-bit arithmetic. We have a carry.. | 37 | * Uhhuh, this needs 65-bit arithmetic. We have a carry.. |
38 | */ | 38 | */ |
39 | #define __range_not_ok(addr,size) ({ \ | 39 | #define __range_not_ok(addr,size) ({ \ |
40 | unsigned long flag,sum; \ | 40 | unsigned long flag,roksum; \ |
41 | __chk_user_ptr(addr); \ | 41 | __chk_user_ptr(addr); \ |
42 | asm("# range_ok\n\r" \ | 42 | asm("# range_ok\n\r" \ |
43 | "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ | 43 | "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ |
44 | :"=&r" (flag), "=r" (sum) \ | 44 | :"=&r" (flag), "=r" (roksum) \ |
45 | :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ | 45 | :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ |
46 | flag; }) | 46 | flag; }) |
47 | 47 | ||