aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c4
-rw-r--r--net/core/sock.c3
-rw-r--r--net/ipv4/inetpeer.c4
-rw-r--r--net/ipv6/ip6_tunnel.c4
-rw-r--r--net/irda/irnetlink.c2
5 files changed, 9 insertions, 8 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 38212c3f9971..ee4035571c21 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3624,7 +3624,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
3624 3624
3625 /* ensure 32-byte alignment of both the device and private area */ 3625 /* ensure 32-byte alignment of both the device and private area */
3626 alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST + 3626 alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST +
3627 (sizeof(struct net_device_subqueue) * queue_count)) & 3627 (sizeof(struct net_device_subqueue) * (queue_count - 1))) &
3628 ~NETDEV_ALIGN_CONST; 3628 ~NETDEV_ALIGN_CONST;
3629 alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; 3629 alloc_size += sizeof_priv + NETDEV_ALIGN_CONST;
3630 3630
@@ -3642,7 +3642,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
3642 dev->priv = ((char *)dev + 3642 dev->priv = ((char *)dev +
3643 ((sizeof(struct net_device) + 3643 ((sizeof(struct net_device) +
3644 (sizeof(struct net_device_subqueue) * 3644 (sizeof(struct net_device_subqueue) *
3645 queue_count) + NETDEV_ALIGN_CONST) 3645 (queue_count - 1)) + NETDEV_ALIGN_CONST)
3646 & ~NETDEV_ALIGN_CONST)); 3646 & ~NETDEV_ALIGN_CONST));
3647 } 3647 }
3648 3648
diff --git a/net/core/sock.c b/net/core/sock.c
index bd209c4477a9..cfed7d42c485 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -182,7 +182,8 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = {
182 "clock-21" , "clock-AF_SNA" , "clock-AF_IRDA" , 182 "clock-21" , "clock-AF_SNA" , "clock-AF_IRDA" ,
183 "clock-AF_PPPOX" , "clock-AF_WANPIPE" , "clock-AF_LLC" , 183 "clock-AF_PPPOX" , "clock-AF_WANPIPE" , "clock-AF_LLC" ,
184 "clock-27" , "clock-28" , "clock-29" , 184 "clock-27" , "clock-28" , "clock-29" ,
185 "clock-AF_TIPC" , "clock-AF_BLUETOOTH", "clock-AF_MAX" 185 "clock-AF_TIPC" , "clock-AF_BLUETOOTH", "clock-AF_IUCV" ,
186 "clock-AF_RXRPC" , "clock-AF_MAX"
186}; 187};
187#endif 188#endif
188 189
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index 6cbce96a54ce..771031dfbd0f 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -158,7 +158,7 @@ static void unlink_from_unused(struct inet_peer *p)
158#define lookup(_daddr,_stack) \ 158#define lookup(_daddr,_stack) \
159({ \ 159({ \
160 struct inet_peer *u, **v; \ 160 struct inet_peer *u, **v; \
161 if (_stack) { \ 161 if (_stack != NULL) { \
162 stackptr = _stack; \ 162 stackptr = _stack; \
163 *stackptr++ = &peer_root; \ 163 *stackptr++ = &peer_root; \
164 } \ 164 } \
@@ -169,7 +169,7 @@ static void unlink_from_unused(struct inet_peer *p)
169 v = &u->avl_left; \ 169 v = &u->avl_left; \
170 else \ 170 else \
171 v = &u->avl_right; \ 171 v = &u->avl_right; \
172 if (_stack) \ 172 if (_stack != NULL) \
173 *stackptr++ = v; \ 173 *stackptr++ = v; \
174 u = *v; \ 174 u = *v; \
175 } \ 175 } \
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 281aee42d3f0..df30976f6dfd 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -962,8 +962,8 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
962 dsfield = ipv4_get_dsfield(iph); 962 dsfield = ipv4_get_dsfield(iph);
963 963
964 if ((t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)) 964 if ((t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS))
965 fl.fl6_flowlabel |= ntohl(((__u32)iph->tos << IPV6_TCLASS_SHIFT) 965 fl.fl6_flowlabel |= htonl((__u32)iph->tos << IPV6_TCLASS_SHIFT)
966 & IPV6_TCLASS_MASK); 966 & IPV6_TCLASS_MASK;
967 967
968 err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu); 968 err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu);
969 if (err != 0) { 969 if (err != 0) {
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c
index db716580e1ae..694ea4d92fa8 100644
--- a/net/irda/irnetlink.c
+++ b/net/irda/irnetlink.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * IrDA netlink layer, for stack configuration. 2 * IrDA netlink layer, for stack configuration.
3 * 3 *
4 * Copyright (c) 2007 Samuel Ortiz <samuel@sortiz> 4 * Copyright (c) 2007 Samuel Ortiz <samuel@sortiz.org>
5 * 5 *
6 * Partly based on the 802.11 nelink implementation 6 * Partly based on the 802.11 nelink implementation
7 * (see net/wireless/nl80211.c) which is: 7 * (see net/wireless/nl80211.c) which is: