linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] infiniband: fix ipoib build error when IPOIB_CM is not enabled
       [not found] ` <20121003173007.c322d79c31676b9494a6bfd5-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
@ 2012-10-03 21:50   ` Randy Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2012-10-03 21:50 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next-u79uwXL29TY76Z2rM5mHXA, LKML, Roland Dreier,
	Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Andrew Morton

From: Randy Dunlap <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>

Fix build error when INFINIBAND_IPOIB_CM is not enabled:

ERROR: "ipoib_set_mode" [drivers/infiniband/ulp/ipoib/ib_ipoib.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
Cc:	Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc:	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc:	Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc:	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 drivers/infiniband/ulp/ipoib/ipoib_netlink.c |    3 +++
 1 file changed, 3 insertions(+)

--- linux-next-20121003.orig/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
+++ linux-next-20121003/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
@@ -30,6 +30,7 @@
  * SOFTWARE.
  */
 
+#include <linux/kconfig.h>
 #include <linux/netdevice.h>
 #include <linux/module.h>
 #include <net/rtnetlink.h>
@@ -71,11 +72,13 @@ static int ipoib_changelink(struct net_d
 
 	if (data[IFLA_IPOIB_MODE]) {
 		mode  = nla_get_u16(data[IFLA_IPOIB_MODE]);
+#if IS_ENABLED(CONFIG_INFINIBAND_IPOIB_CM)
 		if (mode == IPOIB_MODE_DATAGRAM)
 			ret = ipoib_set_mode(dev, "datagram\n");
 		else if (mode == IPOIB_MODE_CONNECTED)
 			ret = ipoib_set_mode(dev, "connected\n");
 		else
+#endif
 			ret = -EINVAL;
 
 		if (ret < 0)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-03 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20121003173007.c322d79c31676b9494a6bfd5@canb.auug.org.au>
     [not found] ` <20121003173007.c322d79c31676b9494a6bfd5-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2012-10-03 21:50   ` [PATCH -next] infiniband: fix ipoib build error when IPOIB_CM is not enabled Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).