aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2012-04-15 01:58:06 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-15 12:44:40 -0400
commit95c961747284a6b83a5e2d81240e214b0fa3464d (patch)
treec7be86a00db3605a48a03109fafcbe31039ca2e0 /net/decnet
parent5e73ea1a31c3612aa6dfe44f864ca5b7b6a4cff9 (diff)
net: cleanup unsigned to unsigned int
Use of "unsigned int" is preferred to bare "unsigned" in net tree. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/af_decnet.c6
-rw-r--r--net/decnet/dn_fib.c5
-rw-r--r--net/decnet/dn_nsp_in.c2
-rw-r--r--net/decnet/dn_nsp_out.c4
-rw-r--r--net/decnet/dn_route.c18
-rw-r--r--net/decnet/dn_rules.c4
6 files changed, 20 insertions, 19 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 4136987d94da..2ba1a2814c24 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -250,7 +250,7 @@ static void dn_unhash_sock_bh(struct sock *sk)
250static struct hlist_head *listen_hash(struct sockaddr_dn *addr) 250static struct hlist_head *listen_hash(struct sockaddr_dn *addr)
251{ 251{
252 int i; 252 int i;
253 unsigned hash = addr->sdn_objnum; 253 unsigned int hash = addr->sdn_objnum;
254 254
255 if (hash == 0) { 255 if (hash == 0) {
256 hash = addr->sdn_objnamel; 256 hash = addr->sdn_objnamel;
@@ -1844,9 +1844,9 @@ static inline int dn_queue_too_long(struct dn_scp *scp, struct sk_buff_head *que
1844 * inclusion (or not) of the two 16 bit acknowledgement fields so it doesn't 1844 * inclusion (or not) of the two 16 bit acknowledgement fields so it doesn't
1845 * make much practical difference. 1845 * make much practical difference.
1846 */ 1846 */
1847unsigned dn_mss_from_pmtu(struct net_device *dev, int mtu) 1847unsigned int dn_mss_from_pmtu(struct net_device *dev, int mtu)
1848{ 1848{
1849 unsigned mss = 230 - DN_MAX_NSP_DATA_HEADER; 1849 unsigned int mss = 230 - DN_MAX_NSP_DATA_HEADER;
1850 if (dev) { 1850 if (dev) {
1851 struct dn_dev *dn_db = rcu_dereference_raw(dev->dn_ptr); 1851 struct dn_dev *dn_db = rcu_dereference_raw(dev->dn_ptr);
1852 mtu -= LL_RESERVED_SPACE(dev); 1852 mtu -= LL_RESERVED_SPACE(dev);
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index 9e885f180b60..65a8cd7891fe 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -302,11 +302,12 @@ struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct dn_kern_rta
302 struct rtattr *attr = RTA_DATA(rta->rta_mx); 302 struct rtattr *attr = RTA_DATA(rta->rta_mx);
303 303
304 while(RTA_OK(attr, attrlen)) { 304 while(RTA_OK(attr, attrlen)) {
305 unsigned flavour = attr->rta_type; 305 unsigned int flavour = attr->rta_type;
306
306 if (flavour) { 307 if (flavour) {
307 if (flavour > RTAX_MAX) 308 if (flavour > RTAX_MAX)
308 goto err_inval; 309 goto err_inval;
309 fi->fib_metrics[flavour-1] = *(unsigned*)RTA_DATA(attr); 310 fi->fib_metrics[flavour-1] = *(unsigned int *)RTA_DATA(attr);
310 } 311 }
311 attr = RTA_NEXT(attr, attrlen); 312 attr = RTA_NEXT(attr, attrlen);
312 } 313 }
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c
index f6544b2c91b0..58084f37151e 100644
--- a/net/decnet/dn_nsp_in.c
+++ b/net/decnet/dn_nsp_in.c
@@ -588,7 +588,7 @@ static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig
588 number of warnings when compiling with -W --ANK 588 number of warnings when compiling with -W --ANK
589 */ 589 */
590 if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= 590 if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
591 (unsigned)sk->sk_rcvbuf) { 591 (unsigned int)sk->sk_rcvbuf) {
592 err = -ENOMEM; 592 err = -ENOMEM;
593 goto out; 593 goto out;
594 } 594 }
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c
index e446e85e64a6..b952f88d9c1f 100644
--- a/net/decnet/dn_nsp_out.c
+++ b/net/decnet/dn_nsp_out.c
@@ -209,7 +209,7 @@ static void dn_nsp_rtt(struct sock *sk, long rtt)
209 * 209 *
210 * Returns: The number of times the packet has been sent previously 210 * Returns: The number of times the packet has been sent previously
211 */ 211 */
212static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, 212static inline unsigned int dn_nsp_clone_and_send(struct sk_buff *skb,
213 gfp_t gfp) 213 gfp_t gfp)
214{ 214{
215 struct dn_skb_cb *cb = DN_SKB_CB(skb); 215 struct dn_skb_cb *cb = DN_SKB_CB(skb);
@@ -240,7 +240,7 @@ void dn_nsp_output(struct sock *sk)
240{ 240{
241 struct dn_scp *scp = DN_SK(sk); 241 struct dn_scp *scp = DN_SK(sk);
242 struct sk_buff *skb; 242 struct sk_buff *skb;
243 unsigned reduce_win = 0; 243 unsigned int reduce_win = 0;
244 244
245 /* 245 /*
246 * First we check for otherdata/linkservice messages 246 * First we check for otherdata/linkservice messages
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 *);
122static void dn_run_flush(unsigned long dummy); 122static void dn_run_flush(unsigned long dummy);
123 123
124static struct dn_rt_hash_bucket *dn_rt_hash_table; 124static struct dn_rt_hash_bucket *dn_rt_hash_table;
125static unsigned dn_rt_hash_mask; 125static unsigned int dn_rt_hash_mask;
126 126
127static struct timer_list dn_route_timer; 127static struct timer_list dn_route_timer;
128static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0); 128static 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
152static __inline__ unsigned dn_hash(__le16 src, __le16 dst) 152static __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
161static inline void dnrt_free(struct dn_route *rt) 161static 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
300static int dn_insert_route(struct dn_route *rt, unsigned hash, struct dn_route **rp) 300static 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 */
1210static int __dn_route_output_key(struct dst_entry **pprt, const struct flowidn *flp, int flags) 1210static 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;
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index 7399e3d51922..e65f2c856e06 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -177,11 +177,11 @@ static int dn_fib_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh,
177 return 1; 177 return 1;
178} 178}
179 179
180unsigned dnet_addr_type(__le16 addr) 180unsigned int dnet_addr_type(__le16 addr)
181{ 181{
182 struct flowidn fld = { .daddr = addr }; 182 struct flowidn fld = { .daddr = addr };
183 struct dn_fib_res res; 183 struct dn_fib_res res;
184 unsigned ret = RTN_UNICAST; 184 unsigned int ret = RTN_UNICAST;
185 struct dn_fib_table *tb = dn_fib_get_table(RT_TABLE_LOCAL, 0); 185 struct dn_fib_table *tb = dn_fib_get_table(RT_TABLE_LOCAL, 0);
186 186
187 res.r = NULL; 187 res.r = NULL;