On Tue, Oct 31, 2017 at 11:39 PM, Niklas Cassel <niklas.cassel@xxxxxxxx> wrote: > Signed-off-by: Niklas Cassel <niklas.cassel@xxxxxxxx> 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