From patchwork Fri Jan 19 09:39:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10174915 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DBC1960386 for ; Fri, 19 Jan 2018 09:39:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C55322860B for ; Fri, 19 Jan 2018 09:39:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B91DE28613; Fri, 19 Jan 2018 09:39:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8CA22860B for ; Fri, 19 Jan 2018 09:39:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754877AbeASJj2 (ORCPT ); Fri, 19 Jan 2018 04:39:28 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:50638 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754771AbeASJjX (ORCPT ); Fri, 19 Jan 2018 04:39:23 -0500 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 036FB1849A; Fri, 19 Jan 2018 10:39:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id XFb0eLo4a5zz; Fri, 19 Jan 2018 10:39:18 +0100 (CET) Received: from boulder02.se.axis.com (boulder02.se.axis.com [10.0.8.16]) by bastet.se.axis.com (Postfix) with ESMTPS id DCF9F182B3; Fri, 19 Jan 2018 10:39:17 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 97C641A065; Fri, 19 Jan 2018 10:39:17 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8C9251A062; Fri, 19 Jan 2018 10:39:17 +0100 (CET) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder02.se.axis.com (Postfix) with ESMTP; Fri, 19 Jan 2018 10:39:17 +0100 (CET) Received: from lnxartpec1.se.axis.com (lnxartpec1.se.axis.com [10.88.4.10]) by thoth.se.axis.com (Postfix) with ESMTP id 80B9D195C; Fri, 19 Jan 2018 10:39:17 +0100 (CET) Received: by lnxartpec1.se.axis.com (Postfix, from userid 20283) id 7ABC4401C3; Fri, 19 Jan 2018 10:39:17 +0100 (CET) From: Niklas Cassel To: lorenzo.pieralisi@arm.com, Bjorn Helgaas Cc: arnd@arndb.de, kishon@ti.com, Niklas Cassel , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build Date: Fri, 19 Jan 2018 10:39:06 +0100 Message-Id: <20180119093906.27670-1-niklas.cassel@axis.com> X-Mailer: git-send-email 2.14.2 X-TM-AS-GCONF: 00 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If CONFIG_PCI=n and CONFIG_PCI_DRA7XX_EP=y, the build fails with: drivers/pci/dwc/pci-dra7xx.c:229:11: error: 'pci_irqd_intx_xlate' undeclared here (not in a function) When building drivers/pci/dwc/pci-dra7xx.c without CONFIG_PCI, gcc is usually smart enough to realize that RC specific code is unreachable and can thus be eliminated. However, gcc cannot do this if there is a function that isn't even declared. Hence fix the issue by introducing a dummy for pci_irqd_intx_xlate(). Acked-by: Arnd Bergmann Acked-by: Lorenzo Pieralisi Signed-off-by: Niklas Cassel --- include/linux/pci.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/pci.h b/include/linux/pci.h index 83299833a6ce..41c676a011f4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1675,6 +1675,13 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } #define dev_is_pf(d) (false) static inline bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags) { return false; } +static inline int pci_irqd_intx_xlate(struct irq_domain *d, + struct device_node *node, + const u32 *intspec, + unsigned int intsize, + unsigned long *out_hwirq, + unsigned int *out_type) +{ return -EINVAL; } #endif /* CONFIG_PCI */ /* Include architecture-dependent settings and functions */