diff options
Diffstat (limited to 'net/decnet/dn_route.c')
-rw-r--r-- | net/decnet/dn_route.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 80a3de4906d3..7e1f8788da19 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -122,7 +122,7 @@ static int dn_route_input(struct sk_buff *); | |||
122 | static void dn_run_flush(unsigned long dummy); | 122 | static void dn_run_flush(unsigned long dummy); |
123 | 123 | ||
124 | static struct dn_rt_hash_bucket *dn_rt_hash_table; | 124 | static struct dn_rt_hash_bucket *dn_rt_hash_table; |
125 | static unsigned dn_rt_hash_mask; | 125 | static unsigned int dn_rt_hash_mask; |
126 | 126 | ||
127 | static struct timer_list dn_route_timer; | 127 | static struct timer_list dn_route_timer; |
128 | static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0); | 128 | static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0); |
@@ -149,13 +149,13 @@ static void dn_dst_destroy(struct dst_entry *dst) | |||
149 | dst_destroy_metrics_generic(dst); | 149 | dst_destroy_metrics_generic(dst); |
150 | } | 150 | } |
151 | 151 | ||
152 | static __inline__ unsigned dn_hash(__le16 src, __le16 dst) | 152 | static __inline__ unsigned int dn_hash(__le16 src, __le16 dst) |
153 | { | 153 | { |
154 | __u16 tmp = (__u16 __force)(src ^ dst); | 154 | __u16 tmp = (__u16 __force)(src ^ dst); |
155 | tmp ^= (tmp >> 3); | 155 | tmp ^= (tmp >> 3); |
156 | tmp ^= (tmp >> 5); | 156 | tmp ^= (tmp >> 5); |
157 | tmp ^= (tmp >> 10); | 157 | tmp ^= (tmp >> 10); |
158 | return dn_rt_hash_mask & (unsigned)tmp; | 158 | return dn_rt_hash_mask & (unsigned int)tmp; |
159 | } | 159 | } |
160 | 160 | ||
161 | static inline void dnrt_free(struct dn_route *rt) | 161 | static inline void dnrt_free(struct dn_route *rt) |
@@ -297,7 +297,7 @@ static inline int compare_keys(struct flowidn *fl1, struct flowidn *fl2) | |||
297 | (fl1->flowidn_iif ^ fl2->flowidn_iif)) == 0; | 297 | (fl1->flowidn_iif ^ fl2->flowidn_iif)) == 0; |
298 | } | 298 | } |
299 | 299 | ||
300 | static int dn_insert_route(struct dn_route *rt, unsigned hash, struct dn_route **rp) | 300 | static int dn_insert_route(struct dn_route *rt, unsigned int hash, struct dn_route **rp) |
301 | { | 301 | { |
302 | struct dn_route *rth; | 302 | struct dn_route *rth; |
303 | struct dn_route __rcu **rthp; | 303 | struct dn_route __rcu **rthp; |
@@ -934,8 +934,8 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowidn *o | |||
934 | struct dn_route *rt = NULL; | 934 | struct dn_route *rt = NULL; |
935 | struct net_device *dev_out = NULL, *dev; | 935 | struct net_device *dev_out = NULL, *dev; |
936 | struct neighbour *neigh = NULL; | 936 | struct neighbour *neigh = NULL; |
937 | unsigned hash; | 937 | unsigned int hash; |
938 | unsigned flags = 0; | 938 | unsigned int flags = 0; |
939 | struct dn_fib_res res = { .fi = NULL, .type = RTN_UNICAST }; | 939 | struct dn_fib_res res = { .fi = NULL, .type = RTN_UNICAST }; |
940 | int err; | 940 | int err; |
941 | int free_res = 0; | 941 | int free_res = 0; |
@@ -1209,7 +1209,7 @@ e_neighbour: | |||
1209 | */ | 1209 | */ |
1210 | static int __dn_route_output_key(struct dst_entry **pprt, const struct flowidn *flp, int flags) | 1210 | static int __dn_route_output_key(struct dst_entry **pprt, const struct flowidn *flp, int flags) |
1211 | { | 1211 | { |
1212 | unsigned hash = dn_hash(flp->saddr, flp->daddr); | 1212 | unsigned int hash = dn_hash(flp->saddr, flp->daddr); |
1213 | struct dn_route *rt = NULL; | 1213 | struct dn_route *rt = NULL; |
1214 | 1214 | ||
1215 | if (!(flags & MSG_TRYHARD)) { | 1215 | if (!(flags & MSG_TRYHARD)) { |
@@ -1275,7 +1275,7 @@ static int dn_route_input_slow(struct sk_buff *skb) | |||
1275 | struct net_device *out_dev = NULL; | 1275 | struct net_device *out_dev = NULL; |
1276 | struct dn_dev *dn_db; | 1276 | struct dn_dev *dn_db; |
1277 | struct neighbour *neigh = NULL; | 1277 | struct neighbour *neigh = NULL; |
1278 | unsigned hash; | 1278 | unsigned int hash; |
1279 | int flags = 0; | 1279 | int flags = 0; |
1280 | __le16 gateway = 0; | 1280 | __le16 gateway = 0; |
1281 | __le16 local_src = 0; | 1281 | __le16 local_src = 0; |
@@ -1490,7 +1490,7 @@ static int dn_route_input(struct sk_buff *skb) | |||
1490 | { | 1490 | { |
1491 | struct dn_route *rt; | 1491 | struct dn_route *rt; |
1492 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 1492 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
1493 | unsigned hash = dn_hash(cb->src, cb->dst); | 1493 | unsigned int hash = dn_hash(cb->src, cb->dst); |
1494 | 1494 | ||
1495 | if (skb_dst(skb)) | 1495 | if (skb_dst(skb)) |
1496 | return 0; | 1496 | return 0; |