public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Roland Dreier <roland@kernel.org>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	linux-rdma@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH -next] infiniband: fix ipoib build error when IPOIB_CM is not enabled
Date: Wed, 03 Oct 2012 14:50:41 -0700	[thread overview]
Message-ID: <506CB331.8000101@xenotime.net> (raw)
In-Reply-To: <20121003173007.c322d79c31676b9494a6bfd5@canb.auug.org.au>

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)

  reply	other threads:[~2012-10-03 21:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-03  7:30 linux-next: Tree for Oct 3 Stephen Rothwell
2012-10-03 21:50 ` Randy Dunlap [this message]
2012-10-03 23:04 ` [PATCH -next] asymmetric keys: fix printk format warning Randy Dunlap
2012-10-03 23:08   ` Stephen Rothwell
2012-10-04  3:18     ` Rusty Russell
2012-10-03 23:31 ` linux-next: Tree for Oct 3 (mfd/syscon) Randy Dunlap
2012-10-15  8:32   ` Dong Aisheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=506CB331.8000101@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=akpm@linux-foundation.org \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=roland@kernel.org \
    --cc=sean.hefty@intel.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox