From: Niklas Cassel <niklas.cassel@axis.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Jesper Nilsson <jespern@axis.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Jingoo Han <jingoohan1@gmail.com>,
Shawn Guo <shawn.guo@linaro.org>,
Peter Robinson <pbrobinson@gmail.com>,
Xiaowei Song <songxiaowei@hisilicon.com>,
linux-pci <linux-pci@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@axis.com>
Subject: Re: [PATCH v3 14/17] PCI: dwc: artpec6: Add support for endpoint mode
Date: Fri, 3 Nov 2017 15:16:20 +0100 [thread overview]
Message-ID: <c87b2ef1-9bb4-cb1b-872d-bb234e14511e@axis.com> (raw)
In-Reply-To: <CAK8P3a0u744zK12QLsWQQOaHHbZKu=KaJuuwWejx1eJsgq+gbg@mail.gmail.com>
On 11/03/2017 11:23 AM, Arnd Bergmann wrote:
> On Fri, Nov 3, 2017 at 10:56 AM, Niklas Cassel <niklas.cassel@axis.com> 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
next prev parent reply other threads:[~2017-11-03 14:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 22:39 [PATCH v3 00/17] dwc MSI fixes, ARTPEC-6 EP mode support, ARTPEC-7 SoC support Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 01/17] PCI: dwc: Use DMA-API for allocating MSI data Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 02/17] PCI: designware-ep: dw_pcie_ep_set_msi() should only set MMC bits Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 03/17] PCI: designware-ep: Read-only registers need DBI_RO_WR_EN to be writable Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 04/17] PCI: designware-ep: Pre-allocate memory for MSI in dw_pcie_ep_init Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 05/17] PCI: designware-ep: Remove static keyword from dw_pcie_ep_reset_bar() Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 06/17] PCI: designware-ep: Add generic function for raising MSI irq Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 07/17] PCI: dwc: dra7xx: Refactor Kconfig and Makefile handling for host/ep mode Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 08/17] PCI: dwc: dra7xx: Assign pp->ops in dra7xx_add_pcie_port() rather than in probe Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 09/17] PCI: dwc: dra7xx: Add ifdefs for host/ep specific code Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 10/17] PCI: dwc: artpec6: Remove unused defines Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 11/17] PCI: dwc: artpec6: Use BIT and GENMASK macros Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 12/17] PCI: dwc: artpec6: Split artpec6_pcie_establish_link to smaller functions Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 13/17] bindings: PCI: artpec: Add support for endpoint mode Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 14/17] PCI: dwc: artpec6: " Niklas Cassel
2017-11-02 9:13 ` Arnd Bergmann
2017-11-03 9:56 ` Niklas Cassel
2017-11-03 10:23 ` Arnd Bergmann
2017-11-03 14:16 ` Niklas Cassel [this message]
2017-10-31 22:39 ` [PATCH v3 15/17] PCI: dwc: Make cpu_addr_fixup take struct dw_pcie as argument Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 16/17] bindings: PCI: artpec: Add support for the ARTPEC-7 SoC Niklas Cassel
2017-10-31 22:39 ` [PATCH v3 17/17] PCI: dwc: artpec6: " Niklas Cassel
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=c87b2ef1-9bb4-cb1b-872d-bb234e14511e@axis.com \
--to=niklas.cassel@axis.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=jespern@axis.com \
--cc=jingoohan1@gmail.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=pbrobinson@gmail.com \
--cc=shawn.guo@linaro.org \
--cc=songxiaowei@hisilicon.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
Powered by JetHome