aboutsummaryrefslogtreecommitdiffstats
path: root/arch/score/include/asm
diff options
context:
space:
mode:
authorAlexander Duyck <aduyck@mirantis.com>2016-03-11 17:05:41 -0500
committerDavid S. Miller <davem@davemloft.net>2016-03-13 23:55:13 -0400
commit1e94082963747b551b129528714827f76a090e93 (patch)
tree543178f26d73ba0a7c9307091200ba6856c9fd60 /arch/score/include/asm
parent01cfbad79a5e2b835abf6a8154a341d75a6fc8cd (diff)
ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short
This patch updates csum_ipv6_magic so that it correctly recognizes that protocol is a unsigned 8 bit value. This will allow us to better understand what limitations may or may not be present in how we handle the data. For example there are a number of places that call htonl on the protocol value. This is likely not necessary and can be replaced with a multiplication by ntohl(1) which will be converted to a shift by the compiler. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/score/include/asm')
-rw-r--r--arch/score/include/asm/checksum.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/score/include/asm/checksum.h b/arch/score/include/asm/checksum.h
index a375bc2700be..539d9fd45d21 100644
--- a/arch/score/include/asm/checksum.h
+++ b/arch/score/include/asm/checksum.h
@@ -179,9 +179,8 @@ static inline unsigned short ip_compute_csum(const void *buff, int len)
179 179
180#define _HAVE_ARCH_IPV6_CSUM 180#define _HAVE_ARCH_IPV6_CSUM
181static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, 181static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
182 const struct in6_addr *daddr, 182 const struct in6_addr *daddr,
183 __u32 len, unsigned short proto, 183 __u32 len, __u8 proto, __wsum sum)
184 __wsum sum)
185{ 184{
186 __asm__ __volatile__( 185 __asm__ __volatile__(
187 ".set\tvolatile\t\t\t# csum_ipv6_magic\n\t" 186 ".set\tvolatile\t\t\t# csum_ipv6_magic\n\t"