Re: [PATCH v3 14/17] PCI: dwc: artpec6: Add support for endpoint mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/03/2017 11:23 AM, Arnd Bergmann wrote:
> On Fri, Nov 3, 2017 at 10:56 AM, Niklas Cassel <niklas.cassel@xxxxxxxx> wrote:
>> On 11/02/2017 10:13 AM, Arnd Bergmann wrote:

> 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.

Wow, this actually helps gcc with dead code elimination.
It was even possible to add those !IS_ENABLED the two different
case labels in the switch statement.
I get no unwanted symbols when looking at the vmlinux in gdb.

Great suggestion Arnd :)


Regards,
Niklas



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux