From patchwork Thu Dec 17 15:52:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 58601 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp449146lbb; Thu, 17 Dec 2015 07:52:18 -0800 (PST) X-Received: by 10.98.19.9 with SMTP id b9mr15023285pfj.28.1450367538388; Thu, 17 Dec 2015 07:52:18 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si13151009pfi.99.2015.12.17.07.52.18; Thu, 17 Dec 2015 07:52:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-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-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934844AbbLQPwQ (ORCPT + 4 others); Thu, 17 Dec 2015 10:52:16 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:39092 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932318AbbLQPwQ (ORCPT ); Thu, 17 Dec 2015 10:52:16 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id tBHFqDRl013313; Thu, 17 Dec 2015 09:52:13 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id tBHFqDKk003131; Thu, 17 Dec 2015 09:52:13 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Thu, 17 Dec 2015 09:52:13 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id tBHFqC0B022935; Thu, 17 Dec 2015 09:52:13 -0600 From: Felipe Balbi To: kbuild test robot , Bin Liu CC: , Subject: Re: [balbi-usb:next 38/65] (.text+0x0): multiple definition of `of_usb_get_dr_mode_by_phy' In-Reply-To: <201512172308.15a0SlQ4%fengguang.wu@intel.com> References: <201512172308.15a0SlQ4%fengguang.wu@intel.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 17 Dec 2015 09:52:10 -0600 Message-ID: <878u4tdqdx.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi, kbuild test robot writes: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next > head: b7bd98b7db9fc8fe19da1a5ff0215311c6b95e46 > commit: 98bfb39466954c69d2a448e6ddcab6d91cd48e25 [38/65] usb: of: add an api to get dr_mode by the phy node > config: x86_64-acpi-redef (attached as .config) > reproduce: > git checkout 98bfb39466954c69d2a448e6ddcab6d91cd48e25 > # save the attached .config to linux build tree > make ARCH=x86_64 > > All errors (new ones prefixed by >>): > > drivers/usb/common/built-in.o: In function `of_usb_get_dr_mode_by_phy': >>> (.text+0x0): multiple definition of `of_usb_get_dr_mode_by_phy' > drivers/usb/chipidea/built-in.o:(.text+0xd61): first defined here seems like a false positive to me. There's only one definition of of_usb_get_dr_mode_by_phy(). Oh no, wait. Bin missed a static inline. I'll apply this to my 'next'. -- balbi diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h index 3805757dcdc2..974bce93aa28 100644 --- a/include/linux/usb/of.h +++ b/include/linux/usb/of.h @@ -17,7 +17,8 @@ bool of_usb_host_tpl_support(struct device_node *np); int of_usb_update_otg_caps(struct device_node *np, struct usb_otg_caps *otg_caps); #else -enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np) +static inline enum usb_dr_mode +of_usb_get_dr_mode_by_phy(struct device_node *phy_np) { return USB_DR_MODE_UNKNOWN; }