From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: jesper.juhl@gmail.com
Subject: [RFC][PATCH 7/9] -Wshadow: fixes for checksum.h
Date: Mon, 10 Jul 2006 13:13:31 +0200 [thread overview]
Message-ID: <200607101313.31310.jesper.juhl@gmail.com> (raw)
(please see the mail titled
"[RFC][PATCH 0/9] -Wshadow: Making the kernel build clean with -Wshadow"
for an explanation of why I'm doing this)
Some -Wshadow fixes for include/[asm-i386|net]/checksum.h
include/asm/checksum.h:185: warning: declaration of 'sum' shadows a parameter
include/asm/checksum.h:181: warning: shadowed declaration is here
include/net/checksum.h:33: warning: declaration of 'sum' shadows a parameter
include/net/checksum.h:31: warning: shadowed declaration is here
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
include/asm-i386/checksum.h | 4 ++--
include/net/checksum.h | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
--- linux-2.6.18-rc1-orig/include/asm-i386/checksum.h 2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6.18-rc1/include/asm-i386/checksum.h 2006-07-09 21:12:34.000000000 +0200
@@ -178,12 +178,12 @@ static __inline__ unsigned short int csu
#define HAVE_CSUM_COPY_USER
static __inline__ unsigned int csum_and_copy_to_user(const unsigned char *src,
unsigned char __user *dst,
- int len, int sum,
+ int len, int csum,
int *err_ptr)
{
might_sleep();
if (access_ok(VERIFY_WRITE, dst, len))
- return csum_partial_copy_generic(src, (__force unsigned char *)dst, len, sum, NULL, err_ptr);
+ return csum_partial_copy_generic(src, (__force unsigned char *)dst, len, csum, NULL, err_ptr);
if (len)
*err_ptr = -EFAULT;
--- linux-2.6.18-rc1-orig/include/net/checksum.h 2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6.18-rc1/include/net/checksum.h 2006-07-09 21:13:22.000000000 +0200
@@ -28,27 +28,27 @@
#ifndef _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
static inline
unsigned int csum_and_copy_from_user (const unsigned char __user *src, unsigned char *dst,
- int len, int sum, int *err_ptr)
+ int len, int csum, int *err_ptr)
{
if (access_ok(VERIFY_READ, src, len))
- return csum_partial_copy_from_user(src, dst, len, sum, err_ptr);
+ return csum_partial_copy_from_user(src, dst, len, csum, err_ptr);
if (len)
*err_ptr = -EFAULT;
- return sum;
+ return csum;
}
#endif
#ifndef HAVE_CSUM_COPY_USER
static __inline__ unsigned int csum_and_copy_to_user
-(const unsigned char *src, unsigned char __user *dst, int len, unsigned int sum, int *err_ptr)
+(const unsigned char *src, unsigned char __user *dst, int len, unsigned int csum, int *err_ptr)
{
- sum = csum_partial(src, len, sum);
+ sum = csum_partial(src, len, csum);
if (access_ok(VERIFY_WRITE, dst, len)) {
if (copy_to_user(dst, src, len) == 0)
- return sum;
+ return csum;
}
if (len)
*err_ptr = -EFAULT;
reply other threads:[~2006-07-10 11:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200607101313.31310.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.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 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.