/* Returns an 32bit unfolded checksum of the buffer. src and dst are best aligned to 64bits.  */
__wsum csum_partial_copy_to_user(const void *src, void __user *dst, int len, __wsum isum, int *errp)
/* Returns an 32bit unfolded checksum of the buffer. src and dst are best aligned to 64bits.  */
__wsum csum_partial_copy_to_user(const void *src, void __user *dst, int len, __wsum isum, int *errp)
{
	might_sleep();
	if (unlikely(!access_ok(VERIFY_WRITE, dst, len))) {
		*errp = -EFAULT;
		return 0;
	}
	if (unlikely((unsigned long)dst & 6)) {
		while (((unsigned long)dst & 6) && len >= 2) {
			__u16 val16 = *(__u16 *)src;
			isum = (__force __wsum)add32_with_carry(
					(__force unsigned)isum, val16);
			*errp = __put_user(val16, (__u16 __user *)dst);
			if (*errp)
				return isum;
			src += 2;
			dst += 2;
			len -= 2;
		}
	}
	*errp = 0;
	return csum_partial_copy_generic(src, (void __force *)dst,
					 len, isum, NULL, errp);
}