Re: [PATCH 17/52] [microblaze] checksum support

From: Jan Engelhardt
Date: Tue Jan 29 2008 - 16:30:46 EST



On Jan 24 2008 16:02, monstr@xxxxxxxxx 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/