aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-11-02 23:51:01 -0500
committerRoland Dreier <rolandd@cisco.com>2005-11-02 23:51:01 -0500
commit8ae5a8a24f7fe797027d481f88c1464b0e47eede (patch)
tree389cecdfb0769cdddd0e901c1d60b9549b0a6322 /drivers/infiniband/ulp
parent21a384897d48c116b879924c3dd9e96f6f1e764b (diff)
[IPoIB] don't compile debug code if debugging isn't enabled
Don't build ipoib_mcast_iter_ functions if CONFIG_INFINIBAND_IPOIB_DEBUG is not enabled -- their only callers will not be built either. Also move the prototype for ipoib_open() to ipoib.h to fix a sparse warning. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib.h3
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c1
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c4
3 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index c994a916a58a..0095acc0fbbe 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -235,6 +235,7 @@ static inline void ipoib_put_ah(struct ipoib_ah *ah)
235 kref_put(&ah->ref, ipoib_free_ah); 235 kref_put(&ah->ref, ipoib_free_ah);
236} 236}
237 237
238int ipoib_open(struct net_device *dev);
238int ipoib_add_pkey_attr(struct net_device *dev); 239int ipoib_add_pkey_attr(struct net_device *dev);
239 240
240void ipoib_send(struct net_device *dev, struct sk_buff *skb, 241void ipoib_send(struct net_device *dev, struct sk_buff *skb,
@@ -267,6 +268,7 @@ int ipoib_mcast_stop_thread(struct net_device *dev, int flush);
267void ipoib_mcast_dev_down(struct net_device *dev); 268void ipoib_mcast_dev_down(struct net_device *dev);
268void ipoib_mcast_dev_flush(struct net_device *dev); 269void ipoib_mcast_dev_flush(struct net_device *dev);
269 270
271#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
270struct ipoib_mcast_iter *ipoib_mcast_iter_init(struct net_device *dev); 272struct ipoib_mcast_iter *ipoib_mcast_iter_init(struct net_device *dev);
271void ipoib_mcast_iter_free(struct ipoib_mcast_iter *iter); 273void ipoib_mcast_iter_free(struct ipoib_mcast_iter *iter);
272int ipoib_mcast_iter_next(struct ipoib_mcast_iter *iter); 274int ipoib_mcast_iter_next(struct ipoib_mcast_iter *iter);
@@ -276,6 +278,7 @@ void ipoib_mcast_iter_read(struct ipoib_mcast_iter *iter,
276 unsigned int *queuelen, 278 unsigned int *queuelen,
277 unsigned int *complete, 279 unsigned int *complete,
278 unsigned int *send_only); 280 unsigned int *send_only);
281#endif
279 282
280int ipoib_mcast_attach(struct net_device *dev, u16 mlid, 283int ipoib_mcast_attach(struct net_device *dev, u16 mlid,
281 union ib_gid *mgid); 284 union ib_gid *mgid);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 0a6f578f18c8..54ef2fea530f 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -636,7 +636,6 @@ void ipoib_ib_dev_cleanup(struct net_device *dev)
636 * Bug #2507. This implementation will probably be removed when the P_Key 636 * Bug #2507. This implementation will probably be removed when the P_Key
637 * change async notification is available. 637 * change async notification is available.
638 */ 638 */
639int ipoib_open(struct net_device *dev);
640 639
641static void ipoib_pkey_dev_check_presence(struct net_device *dev) 640static void ipoib_pkey_dev_check_presence(struct net_device *dev)
642{ 641{
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 022eec730751..3ecf78a9493a 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -917,6 +917,8 @@ void ipoib_mcast_restart_task(void *dev_ptr)
917 ipoib_mcast_start_thread(dev); 917 ipoib_mcast_start_thread(dev);
918} 918}
919 919
920#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
921
920struct ipoib_mcast_iter *ipoib_mcast_iter_init(struct net_device *dev) 922struct ipoib_mcast_iter *ipoib_mcast_iter_init(struct net_device *dev)
921{ 923{
922 struct ipoib_mcast_iter *iter; 924 struct ipoib_mcast_iter *iter;
@@ -989,3 +991,5 @@ void ipoib_mcast_iter_read(struct ipoib_mcast_iter *iter,
989 *complete = iter->complete; 991 *complete = iter->complete;
990 *send_only = iter->send_only; 992 *send_only = iter->send_only;
991} 993}
994
995#endif /* CONFIG_INFINIBAND_IPOIB_DEBUG */