Commit 0027a51e authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[SPARSE]: Annotate csum_and_copy_to_user().

parent d00164e4
......@@ -172,8 +172,10 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
* Copy and checksum to user
*/
#define HAVE_CSUM_COPY_USER
static __inline__ unsigned int csum_and_copy_to_user(const char *src, char *dst,
int len, int sum, int *err_ptr)
static __inline__ unsigned int csum_and_copy_to_user(const char *src,
char __user *dst,
int len, int sum,
int *err_ptr)
{
if (access_ok(VERIFY_WRITE, dst, len))
return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);
......
......@@ -41,7 +41,8 @@ unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len,
* Copy and checksum to user
*/
#define HAVE_CSUM_COPY_USER
static inline unsigned int csum_and_copy_to_user (const char *src, char *dst,
static inline unsigned int csum_and_copy_to_user (const char *src,
char __user *dst,
int len, int sum,
int *err_ptr)
{
......
......@@ -191,8 +191,10 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
* Copy and checksum to user
*/
#define HAVE_CSUM_COPY_USER
static __inline__ unsigned int csum_and_copy_to_user (const char *src, char *dst,
int len, int sum, int *err_ptr)
static __inline__ unsigned int csum_and_copy_to_user (const char *src,
char __user *dst,
int len, int sum,
int *err_ptr)
{
/* code stolen from include/asm-mips64 */
sum = csum_partial(src, len, sum);
......
......@@ -201,8 +201,10 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
* Copy and checksum to user
*/
#define HAVE_CSUM_COPY_USER
static __inline__ unsigned int csum_and_copy_to_user (const char *src, char *dst,
int len, int sum, int *err_ptr)
static __inline__ unsigned int csum_and_copy_to_user (const char *src,
char __user *dst,
int len, int sum,
int *err_ptr)
{
if (access_ok(VERIFY_WRITE, dst, len))
return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);
......
......@@ -91,7 +91,7 @@ csum_partial_copy_from_user(const char *src, char *dst, int len,
}
static inline unsigned int
csum_partial_copy_to_user(const char *src, char *dst, int len,
csum_partial_copy_to_user(const char *src, char __user *dst, int len,
unsigned int sum, int *err)
{
if (!access_ok (VERIFY_WRITE, dst, len)) {
......
......@@ -66,8 +66,9 @@ csum_partial_copy_from_user(const char *src, char *dst, int len,
*/
#define HAVE_CSUM_COPY_USER
extern unsigned int csum_partial_copy_user_sparc64(const char *src, char *dst, int len, unsigned int sum);
static __inline__ unsigned int
csum_and_copy_to_user(const char *src, char *dst, int len,
csum_and_copy_to_user(const char *src, char __user *dst, int len,
unsigned int sum, int *err)
{
__asm__ __volatile__ ("stx %0, [%%sp + 0x7ff + 128]"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment