From: Tilman Schmidt <tilman@imap.cc>
To: Dave Jones <davej@redhat.com>, Andrew Morton <akpm@osdl.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] fix sparse warnings from {asm,net}/checksum.h
Date: Wed, 3 Jan 2007 03:24:52 +0100 [thread overview]
Message-ID: <200701030224.l032Oqgc022584@lx1.pxnet.com> (raw)
In-Reply-To: <20070101191015.GB20443@redhat.com>
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>
---
asm-arm/uaccess.h | 4 ++--
asm-arm26/uaccess-asm.h | 4 ++--
asm-i386/uaccess.h | 4 ++--
asm-m32r/uaccess.h | 4 ++--
asm-x86_64/uaccess.h | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff -pru linux-2.6.20-rc3-work/include/asm-arm/uaccess.h linux-2.6.20-rc3-new/include/asm-arm/uaccess.h
--- linux-2.6.20-rc3-work/include/asm-arm/uaccess.h 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.20-rc3-new/include/asm-arm/uaccess.h 2007-01-02 00:23:34.000000000 +0100
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t f
/* 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; })
diff -pru linux-2.6.20-rc3-work/include/asm-arm26/uaccess-asm.h linux-2.6.20-rc3-new/include/asm-arm26/uaccess-asm.h
--- linux-2.6.20-rc3-work/include/asm-arm26/uaccess-asm.h 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.20-rc3-new/include/asm-arm26/uaccess-asm.h 2007-01-02 00:23:50.000000000 +0100
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t
}
#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; })
diff -pru linux-2.6.20-rc3-work/include/asm-i386/uaccess.h linux-2.6.20-rc3-new/include/asm-i386/uaccess.h
--- linux-2.6.20-rc3-work/include/asm-i386/uaccess.h 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.20-rc3-new/include/asm-i386/uaccess.h 2007-01-02 00:24:04.000000000 +0100
@@ -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; })
diff -pru linux-2.6.20-rc3-work/include/asm-m32r/uaccess.h linux-2.6.20-rc3-new/include/asm-m32r/uaccess.h
--- linux-2.6.20-rc3-work/include/asm-m32r/uaccess.h 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.20-rc3-new/include/asm-m32r/uaccess.h 2007-01-02 00:24:25.000000000 +0100
@@ -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" ); \
diff -pru linux-2.6.20-rc3-work/include/asm-x86_64/uaccess.h linux-2.6.20-rc3-new/include/asm-x86_64/uaccess.h
--- linux-2.6.20-rc3-work/include/asm-x86_64/uaccess.h 2007-01-01 21:14:56.000000000 +0100
+++ linux-2.6.20-rc3-new/include/asm-x86_64/uaccess.h 2007-01-02 00:25:05.000000000 +0100
@@ -37,11 +37,11 @@
* 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; })
prev parent reply other threads:[~2007-01-03 2:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-01 14:23 Sparse 0.2 " Tilman Schmidt
2007-01-01 19:10 ` Dave Jones
2007-01-03 2:24 ` Tilman Schmidt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200701030224.l032Oqgc022584@lx1.pxnet.com \
--to=tilman@imap.cc \
--cc=akpm@osdl.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®