From patchwork Wed Jan 27 14:04:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101059 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2602731lbb; Wed, 27 Jan 2016 06:07:37 -0800 (PST) X-Received: by 10.66.142.201 with SMTP id ry9mr43140618pab.89.1453903656904; Wed, 27 Jan 2016 06:07:36 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d29si9765368pfj.73.2016.01.27.06.07.36; Wed, 27 Jan 2016 06:07:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932891AbcA0OHd (ORCPT + 30 others); Wed, 27 Jan 2016 09:07:33 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:52792 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932573AbcA0OH3 (ORCPT ); Wed, 27 Jan 2016 09:07:29 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LrEhY-1ZwkKo08Nw-0138oJ; Wed, 27 Jan 2016 15:06:38 +0100 From: Arnd Bergmann To: "David S. Miller" Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , netdev@vger.kernel.org, Michael Chan , Paul Gortmaker , Rajesh Borundia , Rasesh Mody , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-kernel@vger.kernel.org Subject: [PATCH 3/9] net: bgmac: clarify CONFIG_BCMA dependency Date: Wed, 27 Jan 2016 15:04:53 +0100 Message-Id: <1453903507-3427225-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453903507-3427225-1-git-send-email-arnd@arndb.de> References: <1453903507-3427225-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:g/MZ4svSFVmeXjKbNSTIWX6aK9tZIrvgqcANRK3T6VQ8gtNMV1A 7Bqoixlgp+co+RKGJsgdJBTFU5/bWHja2p1PhcUTA9LuxJAWMTqbTkPpTvSOEDqo1sC9ETx Nmf1+DWT6Fb+uh6PTBRYAEaZsos5sVI6/tiw7KvFIxZgcdJvcS0PfIrs/LMX10q3Ljr+gHG bH4VC9qfv85rWzky+fKew== X-UI-Out-Filterresults: notjunk:1; V01:K0:ACFja/sPwtk=:DHGVPqGi7tMyb1VY8NL7DK TtytXm6AHyh0lOAar2Maq4jbfFsT7dqmvS+f4b9ce63qiozILx5C+tGKD4TefnvpTDXwEAbHe psJdN+7NzWu4BolagPT0icyZjOxqmllkULGAFxZL5mO7UFQMgtt+WgaO1iXVQBb0UsUs0BxLo jhDvipdBidiRcyb2y/SZfgUNFU/S0MFY8rzxLgXtN+F1C280iBpSSny5XiFGOxYcLg3eQt5iz /P1nk2NH6Ts1nPG0Lla+Y3GcyquGIoXa7BZsLlF98YBIA+4fqsYKQVE5msdlP5Jjqz271VFj3 tEyxrGZ/6Dh2bK9vekdwdugJEewX1H9rVbRIPC/KWhrr3GN/f6z3EFo41egJu3uhYDbyvJ8k5 JM7SLNzV3kTkRGs5A5MH/qqFmqcCaMDM/LM9ykHIss3LGYn/xz5TlcrfgfYIQ4pNBUxIgroUa VG34q63PI5vC504SFXY+R4j9taUvNGfi3ezkP2cEuGYmll5wDWRxjpYRDB1QeHls3428YswyU PknJOjnr56YxITmxK4vvOYZzSQN+od0cl5bGJUYpQTULX8vgiDXTgq61pJq2yupu2umK7FqU3 mno73XNkvOYDgNmyeM6kwzyiA6v9YNrNcKDfsIK6pDwhm5fRNCEXi+c69IV3V0+uWxRYo9h8a HlpZHlkP2d9nudMlZo08H4BBB/ZSG/IYhnFhlxbfiT6RXv0LMuArvux0Loe+RmS54DeI= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The bgmac driver depends on BCMA_HOST_SOC, which is only used when CONFIG_BCMA is enabled. However, it is a bool option and can be set when CONFIG_BCMA=m, and then bgmac can be built-in, leading to an obvious link error: drivers/built-in.o: In function `bgmac_init': :(.init.text+0x7f2c): undefined reference to `__bcma_driver_register' drivers/built-in.o: In function `bgmac_exit': :(.exit.text+0x110a): undefined reference to `bcma_driver_unregister' To avoid this case, we need to depend on both BCMA and BCMA_SOC, as this patch does. I'm also trying to make the dependency more readable by splitting it into three lines, and adding a COMPILE_TEST alternative so we can test-build it in all configurations that support BCMA. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/broadcom/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig index 8550df189ceb..19f7cd02e085 100644 --- a/drivers/net/ethernet/broadcom/Kconfig +++ b/drivers/net/ethernet/broadcom/Kconfig @@ -151,8 +151,11 @@ config BNX2X_VXLAN config BGMAC tristate "BCMA bus GBit core support" - depends on BCMA_HOST_SOC && HAS_DMA && (BCM47XX || ARCH_BCM_5301X) + depends on BCMA && BCMA_HOST_SOC + depends on HAS_DMA + depends on BCM47XX || ARCH_BCM_5301X || COMPILE_TEST select PHYLIB + select FIXED_PHY ---help--- This driver supports GBit MAC and BCM4706 GBit MAC cores on BCMA bus. They can be found on BCM47xx SoCs and provide gigabit ethernet.