From 5c78f275e696a25a9919671aa8aa3d0a3d967978 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 14 Nov 2006 21:42:26 -0800 Subject: [NET]: IP header modifier helpers annotations. Signed-off-by: Al Viro Signed-off-by: David S. Miller --- include/net/dsfield.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/net/dsfield.h') diff --git a/include/net/dsfield.h b/include/net/dsfield.h index dae8453385b..eb65bf2e250 100644 --- a/include/net/dsfield.h +++ b/include/net/dsfield.h @@ -27,7 +27,7 @@ static inline __u8 ipv6_get_dsfield(struct ipv6hdr *ipv6h) static inline void ipv4_change_dsfield(struct iphdr *iph,__u8 mask, __u8 value) { - __u32 check = ntohs(iph->check); + __u32 check = ntohs((__force __be16)iph->check); __u8 dsfield; dsfield = (iph->tos & mask) | value; @@ -35,7 +35,7 @@ static inline void ipv4_change_dsfield(struct iphdr *iph,__u8 mask, if ((check+1) >> 16) check = (check+1) & 0xffff; check -= dsfield; check += check >> 16; /* adjust carry */ - iph->check = htons(check); + iph->check = (__force __sum16)htons(check); iph->tos = dsfield; } -- cgit v1.2.3