[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0u744zK12QLsWQQOaHHbZKu=KaJuuwWejx1eJsgq+gbg@mail.gmail.com>
Date: Fri, 3 Nov 2017 11:23:32 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Niklas Cassel <niklas.cassel@...s.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
Jesper Nilsson <jespern@...s.com>,
Kishon Vijay Abraham I <kishon@...com>,
Jingoo Han <jingoohan1@...il.com>,
Shawn Guo <shawn.guo@...aro.org>,
Peter Robinson <pbrobinson@...il.com>,
Xiaowei Song <songxiaowei@...ilicon.com>,
linux-pci <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-kernel@...s.com
Subject: Re: [PATCH v3 14/17] PCI: dwc: artpec6: Add support for endpoint mode
On Fri, Nov 3, 2017 at 10:56 AM, Niklas Cassel <niklas.cassel@...s.com> wrote:
> On 11/02/2017 10:13 AM, Arnd Bergmann wrote:
>>
>>
>> Can you try replacing the #ifdef with
>>
>>
>> if (!IS_ENABLED(CONFIG_PCIE_ARTPEC6_HOST))
>> return -ENODEV;
>>
>> at the start of artpec6_pcie_enable_interrupts? I think that would improve
>> readability here.
>>
>
> artpec6_pcie_enable_interrupts is a void function, so
> I guess that you meant at the start of artpec6_add_pcie_port.
Right, sorry about that.
> That would not really help since artpec6_add_pcie_port
> calls artpec6_pcie_msi_handler, and uses artpec6_pcie_host_ops,
> which is still inside the CONFIG_PCIE_ARTPEC6_HOST ifdef block.
>
> Please note that there are several functions, as well as
> artpec6_pcie_host_ops inside the
> CONFIG_PCIE_ARTPEC6_HOST ifdef block.
What I meant is that you can remove the #ifdef entirely if you add
if (!IS_ENABLED(CONFIG_PCIE_ARTPEC6_HOST))
return -ENODEV;
to artpec6_pcie_probe(). Anything after that statement will get
silently dropped by the compiler, including static functions and
structures that are referenced indirectly from there.
Arnd
Powered by blists - more mailing lists