Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 1972

kernel-2.6.18-194.11.1.el5.src.rpm

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 27 May 2009 15:31:05 +1000
Subject: [net] backport csum_unfold without sparse annotations
Message-id: E1M9BjF-00029r-Ek@gondolin.me.apana.org.au
O-Subject: [PATCH 1/17] net: Backport csum_unfold without sparse annotations
Bugzilla: 499347
RH-Acked-by: David Miller <davem@redhat.com>
RH-Acked-by: Neil Horman <nhorman@redhat.com>
RH-Acked-by: Thomas Graf <tgraf@redhat.com>

RHEL5 bugzilla #499347

net: Backport csum_unfold without sparse annotations

This patch addes csum_unfold, but without the sparse annotations
on the argument and return value.  It also kills two other duplicate
backports that are already in the tree for the same function.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/drivers/net/myri10ge/myri10ge_compat.h b/drivers/net/myri10ge/myri10ge_compat.h
index 2c41db9..622e2de 100644
--- a/drivers/net/myri10ge/myri10ge_compat.h
+++ b/drivers/net/myri10ge/myri10ge_compat.h
@@ -5,10 +5,5 @@
 typedef __u16 __bitwise __sum16;
 typedef __u32 __bitwise __wsum;
 
-static inline __wsum csum_unfold(__sum16 n)
-{
-	return (__force __wsum)n;
-}
-
 #endif /*  __MYRI10GE_COMPAT_H__ */
 
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h
index 41025c7..96e516a 100644
--- a/include/linux/inet_lro.h
+++ b/include/linux/inet_lro.h
@@ -37,11 +37,6 @@
 typedef __u16 __bitwise __sum16;
 typedef __u32 __bitwise __wsum;
 
-static inline __wsum csum_unfold(__sum16 n)
-{
-	return (__force __wsum)n;
-}
-
 /*
  * LRO statistics
  */
diff --git a/include/net/checksum.h b/include/net/checksum.h
index e3ea7cc..e0b675c 100644
--- a/include/net/checksum.h
+++ b/include/net/checksum.h
@@ -84,4 +84,9 @@ csum_block_sub(unsigned int csum, unsigned int csum2, int offset)
 	return csum_sub(csum, csum2);
 }
 
+static inline u32 csum_unfold(u16 n)
+{
+	return n;
+}
+
 #endif