From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753761AbdBISKo (ORCPT ); Thu, 9 Feb 2017 13:10:44 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:33141 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752700AbdBISKe (ORCPT ); Thu, 9 Feb 2017 13:10:34 -0500 Date: Thu, 9 Feb 2017 18:22:11 +0100 From: Andrew Lunn To: Arnd Bergmann Cc: "David S . Miller" , netdev@vger.kernel.org, Jason Cooper , Sebastian Hesselbarth , Gregory Clement , Russell King , Florian Fainelli , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Message-ID: <20170209172211.GF29882@lunn.ch> References: <20170209150834.1158193-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170209150834.1158193-1-arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 09, 2017 at 04:08:11PM +0100, Arnd Bergmann wrote: > The newly introduced mdiobus_register_board_info() function is only available > as part of PHYLIB, so we get a link error when we call that from a board while > phylib is disabled: > > arch/arm/plat-orion/common.o: In function `orion_ge00_switch_init': > common.c:(.init.text+0x6a4): undefined reference to `mdiobus_register_board_info' > > This adds a workaround that is made up of three parts: > > - in plat-orion, the function for declaring the switch is hidden without > PHYLIB. > - in mach-orion5x, the caller conditionally stubs out the call to > the removed function, so we can still build other orion5x boards > without PHYLIB > - For the boards that actually declare the switch, we select PHYLIB > explicitly from Kconfig if NETDEVICES is set. Without NETDEVICES, > we cannot enable PHYLIB, but we also wouldn't need it. > > Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Andrew