lkml.org 
[lkml]   [2012]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -next] infiniband: fix ipoib build error when IPOIB_CM is not enabled
From: Randy Dunlap <rdunlap@xenotime.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@xenotime.net>
Cc: Roland Dreier <roland@kernel.org>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: linux-rdma@vger.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)

\
 
 \ /
  Last update: 2012-10-04 00:21    [W:0.059 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site