Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755339AbbBTVYE (ORCPT ); Fri, 20 Feb 2015 16:24:04 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:46772 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754698AbbBTVYC (ORCPT ); Fri, 20 Feb 2015 16:24:02 -0500 Date: Fri, 20 Feb 2015 16:23:58 -0500 (EST) Message-Id: <20150220.162358.1989780304954156949.davem@davemloft.net> To: arnd@arndb.de Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rmk+kernel@arm.linux.org.uk, dbaryshkov@gmail.com, linux-kernel@vger.kernel.org, linus.walleij@linaro.org Subject: Re: [PATCH] net: smc91x: improve neponset hack From: David Miller In-Reply-To: <5763365.j5Nvv4LgM3@wuerfel> References: <5763365.j5Nvv4LgM3@wuerfel> X-Mailer: Mew version 6.5 on Emacs 24.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.7 (shards.monkeyblade.net [149.20.54.216]); Fri, 20 Feb 2015 13:24:01 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1730 Lines: 42 From: Arnd Bergmann Date: Wed, 18 Feb 2015 20:47:30 +0100 > The smc91x driver tries to support multiple platforms at compile > time, but they are mutually exclusive at runtime, and not clearly > defined. > > Trying to build for CONFIG_SA1100_ASSABET without CONFIG_ASSABET_NEPONSET > results in this link error: > > drivers/built-in.o: In function `smc_drv_probe': > :(.text+0x33310c): undefined reference to `neponset_ncr_frob' > > since the neponset_ncr_set function is not defined otherwise. > > Similarly, building for both CONFIG_SA1100_ASSABET and CONFIG_SA1100_PLEB > results in a different build error: > > smsc/smc91x.c: In function 'smc_drv_probe': > smsc/smc91x.c:2299:2: error: implicit declaration of function 'neponset_ncr_set' [-Werror=implicit-function-declaration] > neponset_ncr_set(NCR_ENET_OSC_EN); > ^ > smsc/smc91x.c:2299:19: error: 'NCR_ENET_OSC_EN' undeclared (first use in this function) > neponset_ncr_set(NCR_ENET_OSC_EN); > ^ > > This is an attempt to fix the call site responsible for both > errors, making sure we call the function exactly when the driver > is actually trying to run on the assabet/neponset machine. With > this patch, I no longer see randconfig build errors in this file. > > Signed-off-by: Arnd Bergmann I know this isn't the desired long term solution to this problem, but it's the most minimal risk-free fix for these build failures. Thus, I've applied this, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/