[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 <[email protected]>
Cc: Russell King <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Hirokazu Takata <[email protected]>
Acked-by: Ian Molton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Tilman Schmidt 2007-02-10 01:45:41 -08:00 • committed by Linus Torvalds
commit 16cf5b39b8
5 changed files with 10 additions and 10 deletions

View 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" ); \