From patchwork Wed Oct 3 21:50:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 1543471 X-Patchwork-Delegate: roland@digitalvampire.org Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AD1333FD9C for ; Wed, 3 Oct 2012 21:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756511Ab2JCVuy (ORCPT ); Wed, 3 Oct 2012 17:50:54 -0400 Received: from oproxy11-pub.bluehost.com ([173.254.64.10]:36119 "HELO oproxy11-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756449Ab2JCVux (ORCPT ); Wed, 3 Oct 2012 17:50:53 -0400 Received: (qmail 22085 invoked by uid 0); 3 Oct 2012 21:50:53 -0000 Received: from unknown (HELO box742.bluehost.com) (66.147.244.242) by oproxy11.bluehost.com with SMTP; 3 Oct 2012 21:50:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenotime.net; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=dB4aOtlu6QkiqpeoFCP04LO4eMdtWYNqsjbwc/h5x80=; b=I1w6Z37AadpCSoOsKA4CJCFmMSY43oCnsTMBNFstAiL0z+ZrVqIt76PrWRMo28uzvHN5XbCID7i8edkVm5vog8JBTR1wK2jSkntuSSluzn1j7ouoVH4X0rWp1mFbtLDr; Received: from [50.53.38.135] (port=52785 helo=[192.168.1.2]) by box742.bluehost.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1TJWqD-0005y1-1M; Wed, 03 Oct 2012 15:50:53 -0600 Message-ID: <506CB331.8000101@xenotime.net> Date: Wed, 03 Oct 2012 14:50:41 -0700 From: Randy Dunlap User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110323 Thunderbird/3.1.9 MIME-Version: 1.0 To: Stephen Rothwell CC: linux-next@vger.kernel.org, LKML , Roland Dreier , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, Andrew Morton Subject: [PATCH -next] infiniband: fix ipoib build error when IPOIB_CM is not enabled References: <20121003173007.c322d79c31676b9494a6bfd5@canb.auug.org.au> In-Reply-To: <20121003173007.c322d79c31676b9494a6bfd5@canb.auug.org.au> X-Identified-User: {1807:box742.bluehost.com:xenotime:xenotime.net} {sentby:smtp auth 50.53.38.135 authed with rdunlap@xenotime.net} Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Randy Dunlap 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 Cc: Roland Dreier Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org --- drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 3 +++ 1 file changed, 3 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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 #include #include #include @@ -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)