diff options
author | Anish Bhatt <anish@chelsio.com> | 2014-10-14 23:07:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-15 00:28:59 -0400 |
commit | f42bb57c61fd21fb7e30a2b99dbeb1671666bc47 (patch) | |
tree | 6330fc33cd98a7c536aa41805ab00b844978c035 /drivers/scsi/cxgbi | |
parent | 1bb60376cda108306818365b186450f154ede5f2 (diff) |
cxgb4i : Fix -Wunused-function warning
A bunch of ipv6 related code is left on by default. While this causes no
compilation issues, there is no need to have this enabled by default. Guard
with an ipv6 check, which also takes care of a -Wunused-function warning.
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r-- | drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 8 | ||||
-rw-r--r-- | drivers/scsi/cxgbi/libcxgbi.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index 18d0d1c145ad..df176f0e5e60 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | |||
@@ -259,6 +259,7 @@ static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb, | |||
259 | cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); | 259 | cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); |
260 | } | 260 | } |
261 | 261 | ||
262 | #if IS_ENABLED(CONFIG_IPV6) | ||
262 | static void send_act_open_req6(struct cxgbi_sock *csk, struct sk_buff *skb, | 263 | static void send_act_open_req6(struct cxgbi_sock *csk, struct sk_buff *skb, |
263 | struct l2t_entry *e) | 264 | struct l2t_entry *e) |
264 | { | 265 | { |
@@ -344,6 +345,7 @@ static void send_act_open_req6(struct cxgbi_sock *csk, struct sk_buff *skb, | |||
344 | 345 | ||
345 | cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); | 346 | cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); |
346 | } | 347 | } |
348 | #endif | ||
347 | 349 | ||
348 | static void send_close_req(struct cxgbi_sock *csk) | 350 | static void send_close_req(struct cxgbi_sock *csk) |
349 | { | 351 | { |
@@ -781,9 +783,11 @@ static void csk_act_open_retry_timer(unsigned long data) | |||
781 | if (csk->csk_family == AF_INET) { | 783 | if (csk->csk_family == AF_INET) { |
782 | send_act_open_func = send_act_open_req; | 784 | send_act_open_func = send_act_open_req; |
783 | skb = alloc_wr(size, 0, GFP_ATOMIC); | 785 | skb = alloc_wr(size, 0, GFP_ATOMIC); |
786 | #if IS_ENABLED(CONFIG_IPV6) | ||
784 | } else { | 787 | } else { |
785 | send_act_open_func = send_act_open_req6; | 788 | send_act_open_func = send_act_open_req6; |
786 | skb = alloc_wr(size6, 0, GFP_ATOMIC); | 789 | skb = alloc_wr(size6, 0, GFP_ATOMIC); |
790 | #endif | ||
787 | } | 791 | } |
788 | 792 | ||
789 | if (!skb) | 793 | if (!skb) |
@@ -1335,8 +1339,10 @@ static int init_act_open(struct cxgbi_sock *csk) | |||
1335 | 1339 | ||
1336 | if (csk->csk_family == AF_INET) | 1340 | if (csk->csk_family == AF_INET) |
1337 | skb = alloc_wr(size, 0, GFP_NOIO); | 1341 | skb = alloc_wr(size, 0, GFP_NOIO); |
1342 | #if IS_ENABLED(CONFIG_IPV6) | ||
1338 | else | 1343 | else |
1339 | skb = alloc_wr(size6, 0, GFP_NOIO); | 1344 | skb = alloc_wr(size6, 0, GFP_NOIO); |
1345 | #endif | ||
1340 | 1346 | ||
1341 | if (!skb) | 1347 | if (!skb) |
1342 | goto rel_resource; | 1348 | goto rel_resource; |
@@ -1370,8 +1376,10 @@ static int init_act_open(struct cxgbi_sock *csk) | |||
1370 | cxgbi_sock_set_state(csk, CTP_ACTIVE_OPEN); | 1376 | cxgbi_sock_set_state(csk, CTP_ACTIVE_OPEN); |
1371 | if (csk->csk_family == AF_INET) | 1377 | if (csk->csk_family == AF_INET) |
1372 | send_act_open_req(csk, skb, csk->l2t); | 1378 | send_act_open_req(csk, skb, csk->l2t); |
1379 | #if IS_ENABLED(CONFIG_IPV6) | ||
1373 | else | 1380 | else |
1374 | send_act_open_req6(csk, skb, csk->l2t); | 1381 | send_act_open_req6(csk, skb, csk->l2t); |
1382 | #endif | ||
1375 | neigh_release(n); | 1383 | neigh_release(n); |
1376 | 1384 | ||
1377 | return 0; | 1385 | return 0; |
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index 6a2001d6b442..54fa6e0bc1bb 100644 --- a/drivers/scsi/cxgbi/libcxgbi.c +++ b/drivers/scsi/cxgbi/libcxgbi.c | |||
@@ -275,6 +275,7 @@ struct cxgbi_device *cxgbi_device_find_by_netdev_rcu(struct net_device *ndev, | |||
275 | } | 275 | } |
276 | EXPORT_SYMBOL_GPL(cxgbi_device_find_by_netdev_rcu); | 276 | EXPORT_SYMBOL_GPL(cxgbi_device_find_by_netdev_rcu); |
277 | 277 | ||
278 | #if IS_ENABLED(CONFIG_IPV6) | ||
278 | static struct cxgbi_device *cxgbi_device_find_by_mac(struct net_device *ndev, | 279 | static struct cxgbi_device *cxgbi_device_find_by_mac(struct net_device *ndev, |
279 | int *port) | 280 | int *port) |
280 | { | 281 | { |
@@ -307,6 +308,7 @@ static struct cxgbi_device *cxgbi_device_find_by_mac(struct net_device *ndev, | |||
307 | ndev, ndev->name); | 308 | ndev, ndev->name); |
308 | return NULL; | 309 | return NULL; |
309 | } | 310 | } |
311 | #endif | ||
310 | 312 | ||
311 | void cxgbi_hbas_remove(struct cxgbi_device *cdev) | 313 | void cxgbi_hbas_remove(struct cxgbi_device *cdev) |
312 | { | 314 | { |