]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] fix sparse warnings from {asm,net}/checksum.h
authorTilman Schmidt <tilman@imap.cc>
Sat, 10 Feb 2007 09:45:41 +0000 (01:45 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 18:51:31 +0000 (10:51 -0800)
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>
include/asm-arm/uaccess.h
include/asm-arm26/uaccess-asm.h
include/asm-i386/uaccess.h
include/asm-m32r/uaccess.h
include/asm-x86_64/uaccess.h

index 5f420a0149f1d5dd133e17890d4a81ac2a8f0c74..c92df958802e304dd60fb92a8a92bbb1facf142b 100644 (file)
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs)
 
 /* We use 33-bit arithmetic here... */
 #define __range_ok(addr,size) ({ \
-       unsigned long flag, sum; \
+       unsigned long flag, roksum; \
        __chk_user_ptr(addr);   \
        __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
-               : "=&r" (flag), "=&r" (sum) \
+               : "=&r" (flag), "=&r" (roksum) \
                : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
                : "cc"); \
        flag; })
index 19f798e338c974e17d317233950be3f4105af82a..ade76ec02995c96b48a4493aea5812523d3105af 100644 (file)
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs)
 }
 
 #define __range_ok(addr,size) ({                                       \
-       unsigned long flag, sum;                                        \
+       unsigned long flag, roksum;                                     \
        __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \
-               : "=&r" (flag), "=&r" (sum)                             \
+               : "=&r" (flag), "=&r" (roksum)                          \
                : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit)      \
                : "cc");                                                \
        flag; })
index eef5133b9ce2a03b73b5f4c73f0e771a12b52aa8..70829ae3ad527729cf49e79be5dcd247d1fd9eb5 100644 (file)
@@ -54,10 +54,10 @@ extern struct movsl_mask {
  * This needs 33-bit arithmetic. We have a carry...
  */
 #define __range_ok(addr,size) ({ \
-       unsigned long flag,sum; \
+       unsigned long flag,roksum; \
        __chk_user_ptr(addr); \
        asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
-               :"=&r" (flag), "=r" (sum) \
+               :"=&r" (flag), "=r" (roksum) \
                :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \
        flag; })
 
index 26e978c7e3b40a060c0d3e80f1ef41cf5923635a..bd8c83765a5c66361c8bfc35e0ee172ec5cd3f87 100644 (file)
@@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s)
  * This needs 33-bit arithmetic. We have a carry...
  */
 #define __range_ok(addr,size) ({                                       \
-       unsigned long flag, sum;                                        \
+       unsigned long flag, roksum;                                     \
        __chk_user_ptr(addr);                                           \
        asm (                                                           \
                "       cmpu    %1, %1    ; clear cbit\n"               \
@@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s)
                "       subx    %0, %0\n"                               \
                "       cmpu    %4, %1\n"                               \
                "       subx    %0, %5\n"                               \
-               : "=&r" (flag), "=r" (sum)                              \
+               : "=&r" (flag), "=r" (roksum)                           \
                : "1" (addr), "r" ((int)(size)),                        \
                  "r" (current_thread_info()->addr_limit.seg), "r" (0)  \
                : "cbit" );                                             \
index c0eac519840b2d1d15a4c0751d20293649bbe9b0..8079e29c14fd4ca1212bea28ac313b523a67b5d3 100644 (file)
  * Uhhuh, this needs 65-bit arithmetic. We have a carry..
  */
 #define __range_not_ok(addr,size) ({ \
-       unsigned long flag,sum; \
+       unsigned long flag,roksum; \
        __chk_user_ptr(addr); \
        asm("# range_ok\n\r" \
                "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0"  \
-               :"=&r" (flag), "=r" (sum) \
+               :"=&r" (flag), "=r" (roksum) \
                :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \
        flag; })