[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <506CB331.8000101@xenotime.net>
Date: Wed, 03 Oct 2012 14:50:41 -0700
From: Randy Dunlap <rdunlap@...otime.net>
To: Stephen Rothwell <sfr@...b.auug.org.au>
CC: linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Roland Dreier <roland@...nel.org>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
linux-rdma@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH -next] infiniband: fix ipoib build error when IPOIB_CM is
not enabled
From: Randy Dunlap <rdunlap@...otime.net>
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@...otime.net>
Cc: Roland Dreier <roland@...nel.org>
Cc: Sean Hefty <sean.hefty@...el.com>
Cc: Hal Rosenstock <hal.rosenstock@...il.com>
Cc: linux-rdma@...r.kernel.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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists