aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_semantics.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 21:40:00 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 21:02:23 -0400
commit81f7bf6cbaca02c034b0393c51fc22b29cba20f7 (patch)
treee0da3b9060cb955588895c0c73547df6cc74a8bc /net/ipv4/fib_semantics.c
parent114c7844f34c1608aec20ae7ff85cec471ac90ae (diff)
[IPV4]: net/ipv4/fib annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r--net/ipv4/fib_semantics.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index f7567e92cd9e..884d176e0082 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -203,7 +203,7 @@ static inline unsigned int fib_info_hashfn(const struct fib_info *fi)
203 unsigned int val = fi->fib_nhs; 203 unsigned int val = fi->fib_nhs;
204 204
205 val ^= fi->fib_protocol; 205 val ^= fi->fib_protocol;
206 val ^= fi->fib_prefsrc; 206 val ^= (__force u32)fi->fib_prefsrc;
207 val ^= fi->fib_priority; 207 val ^= fi->fib_priority;
208 208
209 return (val ^ (val >> 7) ^ (val >> 12)) & mask; 209 return (val ^ (val >> 7) ^ (val >> 12)) & mask;
@@ -273,7 +273,7 @@ int ip_fib_check_default(__be32 gw, struct net_device *dev)
273 return -1; 273 return -1;
274} 274}
275 275
276void rtmsg_fib(int event, u32 key, struct fib_alias *fa, 276void rtmsg_fib(int event, __be32 key, struct fib_alias *fa,
277 int dst_len, u32 tb_id, struct nl_info *info) 277 int dst_len, u32 tb_id, struct nl_info *info)
278{ 278{
279 struct sk_buff *skb; 279 struct sk_buff *skb;
@@ -568,11 +568,11 @@ out:
568 return 0; 568 return 0;
569} 569}
570 570
571static inline unsigned int fib_laddr_hashfn(u32 val) 571static inline unsigned int fib_laddr_hashfn(__be32 val)
572{ 572{
573 unsigned int mask = (fib_hash_size - 1); 573 unsigned int mask = (fib_hash_size - 1);
574 574
575 return (val ^ (val >> 7) ^ (val >> 14)) & mask; 575 return ((__force u32)val ^ ((__force u32)val >> 7) ^ ((__force u32)val >> 14)) & mask;
576} 576}
577 577
578static struct hlist_head *fib_hash_alloc(int bytes) 578static struct hlist_head *fib_hash_alloc(int bytes)
@@ -928,7 +928,7 @@ __be32 __fib_res_prefsrc(struct fib_result *res)
928} 928}
929 929
930int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, 930int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
931 u32 tb_id, u8 type, u8 scope, u32 dst, int dst_len, u8 tos, 931 u32 tb_id, u8 type, u8 scope, __be32 dst, int dst_len, u8 tos,
932 struct fib_info *fi, unsigned int flags) 932 struct fib_info *fi, unsigned int flags)
933{ 933{
934 struct nlmsghdr *nlh; 934 struct nlmsghdr *nlh;
@@ -1017,7 +1017,7 @@ nla_put_failure:
1017 - device went down -> we must shutdown all nexthops going via it. 1017 - device went down -> we must shutdown all nexthops going via it.
1018 */ 1018 */
1019 1019
1020int fib_sync_down(u32 local, struct net_device *dev, int force) 1020int fib_sync_down(__be32 local, struct net_device *dev, int force)
1021{ 1021{
1022 int ret = 0; 1022 int ret = 0;
1023 int scope = RT_SCOPE_NOWHERE; 1023 int scope = RT_SCOPE_NOWHERE;