linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Niklas Cassel <niklas.cassel@axis.com>
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 11:23:32 +0100	[thread overview]
Message-ID: <CAK8P3a0u744zK12QLsWQQOaHHbZKu=KaJuuwWejx1eJsgq+gbg@mail.gmail.com> (raw)
In-Reply-To: <5a8c7aaf-552c-7170-2a36-13b50168a9cc@axis.com>

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:

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

  reply	other threads:[~2017-11-03 10:23 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 [this message]
2017-11-03 14:16         ` Niklas Cassel
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='CAK8P3a0u744zK12QLsWQQOaHHbZKu=KaJuuwWejx1eJsgq+gbg@mail.gmail.com' \
    --to=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=niklas.cassel@axis.com \
    --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;
as well as URLs for NNTP newsgroup(s).