diff options
author | Ying Xue <ying.xue@windriver.com> | 2013-10-18 01:23:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-18 13:20:42 -0400 |
commit | 4068243208d605b046479e25c253379069a05fed (patch) | |
tree | fd67288a0a4e8cbd96bb9e1c79ba8bc3ce12b5d7 /net/tipc | |
parent | 9446b87addd90a067b21c726aedd3c42694c1780 (diff) |
tipc: silence sparse warnings
Eliminate below sparse warnings:
net/tipc/link.c:1210:37: warning: cast removes address space of expression
net/tipc/link.c:1218:59: warning: incorrect type in argument 2 (different address spaces)
net/tipc/link.c:1218:59: expected void const [noderef] <asn:1>*from
net/tipc/link.c:1218:59: got unsigned char const [usertype] *[assigned] sect_crs
net/tipc/socket.c:341:49: warning: Using plain integer as NULL pointer
net/tipc/socket.c:1371:36: warning: Using plain integer as NULL pointer
net/tipc/socket.c:1694:57: warning: Using plain integer as NULL pointer
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Andreas Bofjäll <andreas.bofjall@ericsson.com>
Reviewed-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/link.c | 4 | ||||
-rw-r--r-- | net/tipc/socket.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index b02a6dc4efe4..be73a1fa7c65 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -1160,7 +1160,7 @@ static int link_send_sections_long(struct tipc_port *sender, | |||
1160 | struct tipc_msg fragm_hdr; | 1160 | struct tipc_msg fragm_hdr; |
1161 | struct sk_buff *buf, *buf_chain, *prev; | 1161 | struct sk_buff *buf, *buf_chain, *prev; |
1162 | u32 fragm_crs, fragm_rest, hsz, sect_rest; | 1162 | u32 fragm_crs, fragm_rest, hsz, sect_rest; |
1163 | const unchar *sect_crs; | 1163 | const unchar __user *sect_crs; |
1164 | int curr_sect; | 1164 | int curr_sect; |
1165 | u32 fragm_no; | 1165 | u32 fragm_no; |
1166 | int res = 0; | 1166 | int res = 0; |
@@ -1202,7 +1202,7 @@ again: | |||
1202 | 1202 | ||
1203 | if (!sect_rest) { | 1203 | if (!sect_rest) { |
1204 | sect_rest = msg_sect[++curr_sect].iov_len; | 1204 | sect_rest = msg_sect[++curr_sect].iov_len; |
1205 | sect_crs = (const unchar *)msg_sect[curr_sect].iov_base; | 1205 | sect_crs = msg_sect[curr_sect].iov_base; |
1206 | } | 1206 | } |
1207 | 1207 | ||
1208 | if (sect_rest < fragm_rest) | 1208 | if (sect_rest < fragm_rest) |
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index d224382d8270..3906527259d1 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -338,7 +338,7 @@ static int release(struct socket *sock) | |||
338 | buf = __skb_dequeue(&sk->sk_receive_queue); | 338 | buf = __skb_dequeue(&sk->sk_receive_queue); |
339 | if (buf == NULL) | 339 | if (buf == NULL) |
340 | break; | 340 | break; |
341 | if (TIPC_SKB_CB(buf)->handle != 0) | 341 | if (TIPC_SKB_CB(buf)->handle != NULL) |
342 | kfree_skb(buf); | 342 | kfree_skb(buf); |
343 | else { | 343 | else { |
344 | if ((sock->state == SS_CONNECTING) || | 344 | if ((sock->state == SS_CONNECTING) || |
@@ -1364,7 +1364,7 @@ static u32 filter_rcv(struct sock *sk, struct sk_buff *buf) | |||
1364 | return TIPC_ERR_OVERLOAD; | 1364 | return TIPC_ERR_OVERLOAD; |
1365 | 1365 | ||
1366 | /* Enqueue message */ | 1366 | /* Enqueue message */ |
1367 | TIPC_SKB_CB(buf)->handle = 0; | 1367 | TIPC_SKB_CB(buf)->handle = NULL; |
1368 | __skb_queue_tail(&sk->sk_receive_queue, buf); | 1368 | __skb_queue_tail(&sk->sk_receive_queue, buf); |
1369 | skb_set_owner_r(buf, sk); | 1369 | skb_set_owner_r(buf, sk); |
1370 | 1370 | ||
@@ -1687,7 +1687,7 @@ restart: | |||
1687 | /* Disconnect and send a 'FIN+' or 'FIN-' message to peer */ | 1687 | /* Disconnect and send a 'FIN+' or 'FIN-' message to peer */ |
1688 | buf = __skb_dequeue(&sk->sk_receive_queue); | 1688 | buf = __skb_dequeue(&sk->sk_receive_queue); |
1689 | if (buf) { | 1689 | if (buf) { |
1690 | if (TIPC_SKB_CB(buf)->handle != 0) { | 1690 | if (TIPC_SKB_CB(buf)->handle != NULL) { |
1691 | kfree_skb(buf); | 1691 | kfree_skb(buf); |
1692 | goto restart; | 1692 | goto restart; |
1693 | } | 1693 | } |