datapath: Work around debugging for csum_and_copy_to_user().
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / net / checksum.h
1 #ifndef __NET_CHECKSUM_WRAPPER_H
2 #define __NET_CHECKSUM_WRAPPER_H 1
3
4 #include_next <net/checksum.h>
5
6 #ifndef HAVE_CSUM_UNFOLD
7 static inline __wsum csum_unfold(__sum16 n)
8 {
9         return (__force __wsum)n;
10 }
11 #endif /* !HAVE_CSUM_UNFOLD */
12
13 /* Workaround for debugging included in certain versions of XenServer.  It only
14  * applies to 32-bit x86.
15  */
16 #if defined(HAVE_CSUM_COPY_DBG) && defined(CONFIG_X86_32)
17 #define csum_and_copy_to_user(src, dst, len, sum, err_ptr) \
18         csum_and_copy_to_user(src, dst, len, sum, NULL, err_ptr)
19 #endif
20
21 #endif /* checksum.h */