From patchwork Fri May 13 13:09:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102345 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp260558qge; Fri, 13 May 2016 06:11:14 -0700 (PDT) X-Received: by 10.98.41.70 with SMTP id p67mr22930305pfp.93.1463145063526; Fri, 13 May 2016 06:11:03 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id se4si24707246pac.61.2016.05.13.06.11.03; Fri, 13 May 2016 06:11:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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 netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932287AbcEMNKr (ORCPT + 4 others); Fri, 13 May 2016 09:10:47 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:56814 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932127AbcEMNKp (ORCPT ); Fri, 13 May 2016 09:10:45 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0MTP9j-1b99L928Hv-00SRfj; Fri, 13 May 2016 15:10:36 +0200 From: Arnd Bergmann To: "David S. Miller" Cc: Arnd Bergmann , Bjorn Andersson , Courtney Cavin , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: qrtr: fix build problems Date: Fri, 13 May 2016 15:09:58 +0200 Message-Id: <1463145025-4011396-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:pF8KIz+z09yGvjdUsag78zNHYIM+PI8ExobyiZNN3udD9xbbzC1 AhTlXIsyjc8c3rkt1NHZpSEjwLkjvrUy2g5mTt5X37G4SttFZrCHzZDN/RDCMFA/1GDCHrY D2F9CD3meL6ZduVBstKDEJ4gPLsWodCmCBfpqr3VUqjYikgs54FVA9HF2t1dsdC8qU1IUGH U9V9XFC34BZd0geDfFgMA== X-UI-Out-Filterresults: notjunk:1; V01:K0:pcwoD+5ciLw=:rMgIdq5W4apFEW33MHuW/n gbWDMq19SM7x/ylp3t8sV24mtyMR20qekZSkpq+lWOq9cIxy6HKJ4Kne7/llGYuUsE32HfYp6 vTcD5yJe94+Gq1fbiaUiODAlEop7vgu7EGiHq9C7kwRlQ5QcE22OKJXwmKfRmnuHiltVnbA0G HoKk2huiGKjlWHTBsyM5zBYixQTVURWwYlvylCtppHQmcN6JAWDBPVV8cXsf1vN1EJ5zvkowA gl/iNbz6FCjbrmoBuBAY8Hd8gFOmFLrA2QZNugcax/5n+R8wPlNLJmBA1sIbToPBnAEibJlTB dfDnfJmy0sUPE9S1G2vQqfA6gcp4/nb7YihvD2HMZfIIXOho+WxTzztvKFTloMegO8XfXsVjK co207w/BSMhvrX7sYjb0uBdPvUCN+uzj4u/k8e3CYs4aByCr2XdF3aTRcZbuuQH3M2jJr4v5O t49m+7TFPF3Nn0UU5QLj65ih9v611LZilEAhBKg5ogG7sqSwuiX+9teJ9wZo11Yna7jPeEpTe 6HpwLeuH2tXcjzELkUjbyxANPEPALpsiQRavEZydh69PjBf4NgZewu9V+ayVoo0az+GokMTfb 1E3gT+WVYpAZUiIWujC95JlO1Tb0EP5IfruB54oph0Sy1h92FYKFSLBGgtT+GgI/1JeQ5acrh EueRIdzw7+rCBIty9bB+/j4v2FgHJd4Tq1tYAlQ1WBqCQDjDJpX+6mIxIBocgeDzTtTw= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Having multiple loadable modules with the same name cannot work with modprobe, and having both net/qrtr/smd.ko and drivers/soc/qcom/smd.ko results in a (somewhat cryptic) build error: ERROR: "qcom_smd_driver_unregister" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_driver_register" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_set_drvdata" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_send" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_get_drvdata" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_driver_unregister" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! ERROR: "qcom_smd_driver_register" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! ERROR: "qcom_smd_set_drvdata" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! ERROR: "qcom_smd_send" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! ERROR: "qcom_smd_get_drvdata" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! Also, the qrtr driver uses the SMD interface and has a Kconfig dependency, but also allows for compile-testing when SMD is disabled. However, if with QCOM_SMD=m and COMPILE_TEST=y we can end up with QRTR_SMD=y and that fails with a related link error. The changes the dependency so we can still compile-test the driver but not have it built-in if SMD is a module, to avoid running in the broken configuration, and changes the Makefile to provide the driver under a different module name. Signed-off-by: Arnd Bergmann Fixes: bdabad3e363d ("net: Add Qualcomm IPC router") --- net/qrtr/Kconfig | 2 +- net/qrtr/Makefile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.7.0 diff --git a/net/qrtr/Kconfig b/net/qrtr/Kconfig index 673fd1f86ebe..b83c6807a5ae 100644 --- a/net/qrtr/Kconfig +++ b/net/qrtr/Kconfig @@ -16,7 +16,7 @@ if QRTR config QRTR_SMD tristate "SMD IPC Router channels" - depends on QCOM_SMD || COMPILE_TEST + depends on QCOM_SMD || (COMPILE_TEST && QCOM_SMD=n) ---help--- Say Y here to support SMD based ipcrouter channels. SMD is the most common transport for IPC Router. diff --git a/net/qrtr/Makefile b/net/qrtr/Makefile index 6c00dc623b7e..ab09e40f7c74 100644 --- a/net/qrtr/Makefile +++ b/net/qrtr/Makefile @@ -1,2 +1,4 @@ obj-$(CONFIG_QRTR) := qrtr.o -obj-$(CONFIG_QRTR_SMD) += smd.o + +obj-$(CONFIG_QRTR_SMD) += qrtr-smd.o +qrtr-smd-y := smd.o