aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
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/ipv6
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/ipv6')
-rw-r--r--net/ipv6/addrconf_core.c2
-rw-r--r--net/ipv6/datagram.c2
-rw-r--r--net/ipv6/ip6_flowlabel.c4
-rw-r--r--net/ipv6/ip6_tunnel.c2
-rw-r--r--net/ipv6/ipv6_sockglue.c2
-rw-r--r--net/ipv6/netfilter/ip6_tables.c2
-rw-r--r--net/ipv6/route.c11
-rw-r--r--net/ipv6/xfrm6_tunnel.c6
8 files changed, 15 insertions, 16 deletions
diff --git a/net/ipv6/addrconf_core.c b/net/ipv6/addrconf_core.c
index 7981bde57575..d051e5f4bf34 100644
--- a/net/ipv6/addrconf_core.c
+++ b/net/ipv6/addrconf_core.c
@@ -8,7 +8,7 @@
8 8
9#define IPV6_ADDR_SCOPE_TYPE(scope) ((scope) << 16) 9#define IPV6_ADDR_SCOPE_TYPE(scope) ((scope) << 16)
10 10
11static inline unsigned ipv6_addr_scope2type(unsigned scope) 11static inline unsigned int ipv6_addr_scope2type(unsigned int scope)
12{ 12{
13 switch (scope) { 13 switch (scope) {
14 case IPV6_ADDR_SCOPE_NODELOCAL: 14 case IPV6_ADDR_SCOPE_NODELOCAL:
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index f6210d6fd7d8..7fba35aea06c 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -515,7 +515,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
515 u8 nexthdr = ipv6_hdr(skb)->nexthdr; 515 u8 nexthdr = ipv6_hdr(skb)->nexthdr;
516 516
517 while (off <= opt->lastopt) { 517 while (off <= opt->lastopt) {
518 unsigned len; 518 unsigned int len;
519 u8 *ptr = nh + off; 519 u8 *ptr = nh + off;
520 520
521 switch (nexthdr) { 521 switch (nexthdr) {
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index b7867a1215b1..1dd632971bce 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -705,9 +705,9 @@ static int ip6fl_seq_show(struct seq_file *seq, void *v)
705 struct ip6_flowlabel *fl = v; 705 struct ip6_flowlabel *fl = v;
706 seq_printf(seq, 706 seq_printf(seq,
707 "%05X %-1d %-6d %-6d %-6ld %-8ld %pi6 %-4d\n", 707 "%05X %-1d %-6d %-6d %-6ld %-8ld %pi6 %-4d\n",
708 (unsigned)ntohl(fl->label), 708 (unsigned int)ntohl(fl->label),
709 fl->share, 709 fl->share,
710 (unsigned)fl->owner, 710 (int)fl->owner,
711 atomic_read(&fl->users), 711 atomic_read(&fl->users),
712 fl->linger/HZ, 712 fl->linger/HZ,
713 (long)(fl->expires - jiffies)/HZ, 713 (long)(fl->expires - jiffies)/HZ,
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index aa21da6a09cd..e25b0fdd935c 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -198,7 +198,7 @@ ip6_tnl_bucket(struct ip6_tnl_net *ip6n, const struct ip6_tnl_parm *p)
198{ 198{
199 const struct in6_addr *remote = &p->raddr; 199 const struct in6_addr *remote = &p->raddr;
200 const struct in6_addr *local = &p->laddr; 200 const struct in6_addr *local = &p->laddr;
201 unsigned h = 0; 201 unsigned int h = 0;
202 int prio = 0; 202 int prio = 0;
203 203
204 if (!ipv6_addr_any(remote) || !ipv6_addr_any(local)) { 204 if (!ipv6_addr_any(remote) || !ipv6_addr_any(local)) {
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index ca1af0760c4c..ba6d13d1f1e1 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -942,7 +942,7 @@ static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt,
942} 942}
943 943
944static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, 944static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
945 char __user *optval, int __user *optlen, unsigned flags) 945 char __user *optval, int __user *optlen, unsigned int flags)
946{ 946{
947 struct ipv6_pinfo *np = inet6_sk(sk); 947 struct ipv6_pinfo *np = inet6_sk(sk);
948 int len; 948 int len;
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 9d4e15559319..d4e350f72bbb 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -396,7 +396,7 @@ ip6t_do_table(struct sk_buff *skb,
396 if (v < 0) { 396 if (v < 0) {
397 /* Pop from stack? */ 397 /* Pop from stack? */
398 if (v != XT_RETURN) { 398 if (v != XT_RETURN) {
399 verdict = (unsigned)(-v) - 1; 399 verdict = (unsigned int)(-v) - 1;
400 break; 400 break;
401 } 401 }
402 if (*stackptr <= origptr) 402 if (*stackptr <= origptr)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 8c5df6f3a2de..f910cce69c9f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -82,7 +82,7 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu);
82static struct rt6_info *rt6_add_route_info(struct net *net, 82static struct rt6_info *rt6_add_route_info(struct net *net,
83 const struct in6_addr *prefix, int prefixlen, 83 const struct in6_addr *prefix, int prefixlen,
84 const struct in6_addr *gwaddr, int ifindex, 84 const struct in6_addr *gwaddr, int ifindex,
85 unsigned pref); 85 unsigned int pref);
86static struct rt6_info *rt6_get_route_info(struct net *net, 86static struct rt6_info *rt6_get_route_info(struct net *net,
87 const struct in6_addr *prefix, int prefixlen, 87 const struct in6_addr *prefix, int prefixlen,
88 const struct in6_addr *gwaddr, int ifindex); 88 const struct in6_addr *gwaddr, int ifindex);
@@ -1870,7 +1870,7 @@ out:
1870static struct rt6_info *rt6_add_route_info(struct net *net, 1870static struct rt6_info *rt6_add_route_info(struct net *net,
1871 const struct in6_addr *prefix, int prefixlen, 1871 const struct in6_addr *prefix, int prefixlen,
1872 const struct in6_addr *gwaddr, int ifindex, 1872 const struct in6_addr *gwaddr, int ifindex,
1873 unsigned pref) 1873 unsigned int pref)
1874{ 1874{
1875 struct fib6_config cfg = { 1875 struct fib6_config cfg = {
1876 .fc_table = RT6_TABLE_INFO, 1876 .fc_table = RT6_TABLE_INFO,
@@ -2200,10 +2200,9 @@ void rt6_ifdown(struct net *net, struct net_device *dev)
2200 icmp6_clean_all(fib6_ifdown, &adn); 2200 icmp6_clean_all(fib6_ifdown, &adn);
2201} 2201}
2202 2202
2203struct rt6_mtu_change_arg 2203struct rt6_mtu_change_arg {
2204{
2205 struct net_device *dev; 2204 struct net_device *dev;
2206 unsigned mtu; 2205 unsigned int mtu;
2207}; 2206};
2208 2207
2209static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg) 2208static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg)
@@ -2245,7 +2244,7 @@ static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg)
2245 return 0; 2244 return 0;
2246} 2245}
2247 2246
2248void rt6_mtu_change(struct net_device *dev, unsigned mtu) 2247void rt6_mtu_change(struct net_device *dev, unsigned int mtu)
2249{ 2248{
2250 struct rt6_mtu_change_arg arg = { 2249 struct rt6_mtu_change_arg arg = {
2251 .dev = dev, 2250 .dev = dev,
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index 4fe1db12d2a3..ee5a7065aacc 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -68,9 +68,9 @@ static DEFINE_SPINLOCK(xfrm6_tunnel_spi_lock);
68 68
69static struct kmem_cache *xfrm6_tunnel_spi_kmem __read_mostly; 69static struct kmem_cache *xfrm6_tunnel_spi_kmem __read_mostly;
70 70
71static inline unsigned xfrm6_tunnel_spi_hash_byaddr(const xfrm_address_t *addr) 71static inline unsigned int xfrm6_tunnel_spi_hash_byaddr(const xfrm_address_t *addr)
72{ 72{
73 unsigned h; 73 unsigned int h;
74 74
75 h = (__force u32)(addr->a6[0] ^ addr->a6[1] ^ addr->a6[2] ^ addr->a6[3]); 75 h = (__force u32)(addr->a6[0] ^ addr->a6[1] ^ addr->a6[2] ^ addr->a6[3]);
76 h ^= h >> 16; 76 h ^= h >> 16;
@@ -80,7 +80,7 @@ static inline unsigned xfrm6_tunnel_spi_hash_byaddr(const xfrm_address_t *addr)
80 return h; 80 return h;
81} 81}
82 82
83static inline unsigned xfrm6_tunnel_spi_hash_byspi(u32 spi) 83static inline unsigned int xfrm6_tunnel_spi_hash_byspi(u32 spi)
84{ 84{
85 return spi % XFRM6_TUNNEL_SPI_BYSPI_HSIZE; 85 return spi % XFRM6_TUNNEL_SPI_BYSPI_HSIZE;
86} 86}