lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2017 10:13:25 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Niklas Cassel <niklas.cassel@...s.com>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        Niklas Cassel <niklass@...s.com>,
        Jesper Nilsson <jespern@...s.com>,
        Kishon Vijay Abraham I <kishon@...com>,
        Jingoo Han <jingoohan1@...il.com>,
        Shawn Guo <shawn.guo@...aro.org>,
        Peter Robinson <pbrobinson@...il.com>,
        Xiaowei Song <songxiaowei@...ilicon.com>,
        linux-pci <linux-pci@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arm-kernel@...s.com
Subject: Re: [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@...s.com> wrote:
> Signed-off-by: Niklas Cassel <niklas.cassel@...s.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

Powered by blists - more mailing lists