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>,
	Niklas Cassel <niklass@axis.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: Thu, 2 Nov 2017 10:13:25 +0100	[thread overview]
Message-ID: <CAK8P3a1yGwyZPzd2-usqLe=BiQpdFsyyFOhpP1ZyaCb16rzCSQ@mail.gmail.com> (raw)
In-Reply-To: <20171031223936.27549-15-niklas.cassel@axis.com>

On Tue, Oct 31, 2017 at 11:39 PM, Niklas Cassel <niklas.cassel@axis.com> wrote:
> Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>

It seems like you are missing a changelog text. Please explain what
your work is good for
in any patch you send.

> V3:
> * Removed ifdefs around match table and match table data.
> * Removed ifdefs in probe, use dummy implementations instead.

I think there is room for more of the same ;-)

>
> +#ifdef CONFIG_PCIE_ARTPEC6_HOST
>  static void artpec6_pcie_enable_interrupts(struct artpec6_pcie *artpec6_pcie)
>  {
>         struct dw_pcie *pci = artpec6_pcie->pci;
> @@ -231,11 +257,92 @@ static int artpec6_add_pcie_port(struct artpec6_pcie *artpec6_pcie,
>
>         return 0;
>  }
> +#else
> +static inline int artpec6_add_pcie_port(struct artpec6_pcie *artpec6_pcie,
> +                                       struct platform_device *pdev)
> +{
> +       return -ENODEV;
> +}
> +#endif


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.

> +static int artpec6_add_pcie_ep(struct artpec6_pcie *artpec6_pcie,
> +                              struct platform_device *pdev)
> +{
> +       int ret;
> +       struct dw_pcie_ep *ep;
> +       struct resource *res;
> +       struct device *dev = &pdev->dev;
> +       struct dw_pcie *pci = artpec6_pcie->pci;

The same trick should work here with the other symbol.

        Arnd

  reply	other threads:[~2017-11-02  9:13 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 [this message]
2017-11-03  9:56     ` Niklas Cassel
2017-11-03 10:23       ` Arnd Bergmann
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='CAK8P3a1yGwyZPzd2-usqLe=BiQpdFsyyFOhpP1ZyaCb16rzCSQ@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=niklass@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).