From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755274AbdKBJN2 (ORCPT ); Thu, 2 Nov 2017 05:13:28 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:46164 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbdKBJN0 (ORCPT ); Thu, 2 Nov 2017 05:13:26 -0400 X-Google-Smtp-Source: ABhQp+QRoQdQyDf3HRpxa5hiJJgtps3F3UdvIMvaut1/L3rITLUcScqSQvj6vvurOWCySSNlV76cHu8BqtXwEjOGVLM= MIME-Version: 1.0 In-Reply-To: <20171031223936.27549-15-niklas.cassel@axis.com> References: <20171031223936.27549-1-niklas.cassel@axis.com> <20171031223936.27549-15-niklas.cassel@axis.com> From: Arnd Bergmann Date: Thu, 2 Nov 2017 10:13:25 +0100 X-Google-Sender-Auth: gXra1Pqh8v7w5fkc6JRzWr-vYFM Message-ID: Subject: Re: [PATCH v3 14/17] PCI: dwc: artpec6: Add support for endpoint mode To: Niklas Cassel Cc: Bjorn Helgaas , Niklas Cassel , Jesper Nilsson , Kishon Vijay Abraham I , Jingoo Han , Shawn Guo , Peter Robinson , Xiaowei Song , linux-pci , Linux Kernel Mailing List , linux-arm-kernel@axis.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 31, 2017 at 11:39 PM, Niklas Cassel wrote: > Signed-off-by: Niklas Cassel 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