lkml.org 
[lkml]   [2017]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 14/17] PCI: dwc: artpec6: Add support for endpoint mode
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

\
 
 \ /
  Last update: 2017-11-02 10:14    [W:0.090 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site