Received: by 10.223.176.46 with SMTP id f43csp866565wra; Fri, 19 Jan 2018 03:18:43 -0800 (PST) X-Google-Smtp-Source: ACJfBosMVrT2scPFO1d+60LkhEvb+wpOMYnTCjqJTKJQ0XtcenRTEo/Q4tLngppssdZMLD6CLbAN X-Received: by 10.101.81.7 with SMTP id f7mr18701427pgq.451.1516360723153; Fri, 19 Jan 2018 03:18:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516360723; cv=none; d=google.com; s=arc-20160816; b=IzHwjcDqaBx7M9hoctRjWtheM5GThuUQVd9JKSAL29gPJghfYaa7Ri3LXCRqNfdvYc xia4517EsfR5MbNNW7GYQ/TQCmLM9b8HYbu8pQ6VBQ2s8IYxZqRiOeXoQl4pLL7OfmHe TLwBKQZVBynw+BMWpElBOmpjPgAuwfuRLn/x3J3BjHjngfDxsBEnogzn7pI+LwzG6su+ ndN3rXymLbjjiSGY1jQf3EhMSlX1D8YAssgLGzHX0Smedkr7gFV13QlkPVzTrsUwqsGq imtlzZDKAhUlunjnUc13uyqXUFbZGHkgbWNpuwl7NFAqTkvyiqpBkec+eAFV7SwGi1Lu ienw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=UfsiKYYLUr+dHgHvYgzbTWAcva8D8bdfqUYSYqRDwgM=; b=GRbVuMpGiQ7bxPM8CVuVOTZpw9N3ZJ6QKDn/tAViIePVT7sDyxm/OtRgiLPyc19D9j x4XB3pKHoC2sSz74/v6+jqTDOH7pDZYIW0RSTUnEdwh3Zp4O6hPQTyOa1Hyad5uBCGVW fqvHXj0qg0tb5yeih2L0xSEpkrK10DNqjp/ANTELk9UaA4jKFaVrI/6UyAkwL8+kSTvI rtm2MxiTbkektOgakAEluVRcJZHif/e3VtEJpTGoC0JH74cW29LLJ/XT2AHsXPNYD1mL Ko66fUWOmSPr6orw1lSq3IlQGWPYjoQwo1PLUJrxggHCBjHEV202T4PxIq0jJ2GB+X0n MfGA== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si8021956pge.204.2018.01.19.03.18.29; Fri, 19 Jan 2018 03:18:43 -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 S1755411AbeASLSA (ORCPT + 99 others); Fri, 19 Jan 2018 06:18:00 -0500 Received: from foss.arm.com ([217.140.101.70]:37408 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754693AbeASLRz (ORCPT ); Fri, 19 Jan 2018 06:17:55 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E6FF580D; Fri, 19 Jan 2018 03:17:54 -0800 (PST) Received: from red-moon (red-moon.cambridge.arm.com [10.1.206.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6DCB03F487; Fri, 19 Jan 2018 03:17:53 -0800 (PST) Date: Fri, 19 Jan 2018 11:18:59 +0000 From: Lorenzo Pieralisi To: Niklas Cassel , Bjorn Helgaas Cc: Bjorn Helgaas , arnd@arndb.de, kishon@ti.com, Niklas Cassel , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build Message-ID: <20180119111859.GA24300@red-moon> References: <20180119093906.27670-1-niklas.cassel@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180119093906.27670-1-niklas.cassel@axis.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 19, 2018 at 10:39:06AM +0100, Niklas Cassel wrote: > 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 Thanks for the patch. I think the commit log should be rewritten (when you write it think at someone reading it in some time - what you wrote won't probably make any sense) but first, Bjorn are you picking this up ? It does not make much sense to squash it in one of my pci/dwc branch commits - therefore I am asking, just let me know. Thanks, Lorenzo > --- > 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 */ > -- > 2.14.2 >