lkml.org 
[lkml]   [2008]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 17/52] [microblaze] checksum support

On Jan 24 2008 16:02, monstr@monstr.eu wrote:
>+
>+ /*
>+ * copy from fs while checksumming, otherwise like csum_partial
>+ */
>+

That comment got messed up. Also, does any other CPU than x86
have a %ds and %fs register?

If it copies directly from user context, a __user annotation would be
helpful.

>+unsigned int
>+csum_partial_copy_from_user(const char *src, char *dst, int len, int sum,
>+ int *csum_err)
>+{
>+ if (csum_err)
>+ *csum_err = 0;
>+ memcpy(dst, src, len);
>+ return csum_partial(dst, len, sum);
>+}
>+
>+/*
>+ * copy from ds while checksumming, otherwise like csum_partial
>+ */

Ditto.

>+
>+unsigned int
>+csum_partial_copy(const char *src, char *dst, int len, int sum)
>+{
>+ memcpy(dst, src, len);
>+ return csum_partial(dst, len, sum);
>+}
>diff --git a/include/asm-microblaze/checksum.h b/include/asm-microblaze/checksum.h
>new file mode 100644
>index 0000000..4b37bb5
>--- /dev/null
>+++ b/include/asm-microblaze/checksum.h


\
 
 \ /
  Last update: 2008-01-29 22:33    [W:1.191 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site