From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Niklas Cassel <niklas.cassel@axis.com>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
arnd@arndb.de, kishon@ti.com, Niklas Cassel <niklass@axis.com>,
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
Date: Fri, 19 Jan 2018 11:18:59 +0000 [thread overview]
Message-ID: <20180119111859.GA24300@red-moon> (raw)
In-Reply-To: <20180119093906.27670-1-niklas.cassel@axis.com>
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 <arnd@arndb.de>
> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
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
>
next prev parent reply other threads:[~2018-01-19 11:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 9:39 [PATCH] PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build Niklas Cassel
2018-01-19 11:18 ` Lorenzo Pieralisi [this message]
2018-01-19 18:57 ` Bjorn Helgaas
2018-01-20 2:40 ` Bjorn Helgaas
2018-01-22 10:53 ` Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180119111859.GA24300@red-moon \
--to=lorenzo.pieralisi@arm.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=niklas.cassel@axis.com \
--cc=niklass@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).