[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VfqfnTw6PkQq_sGeTe+RpV6iqNEf5JV1TQgpNhMk=VyeA@mail.gmail.com>
Date: Mon, 14 May 2018 02:16:08 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Yao Chen <chenyao11@...wei.com>
Cc: songxiaowei@...ilicon.com, wangbinghui@...ilicon.com,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"xuwei (O)" <xuwei5@...ilicon.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>, linux-pci@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
devicetree <devicetree@...r.kernel.org>, dimitrysh@...gle.com,
guodong.xu@...aro.org, suzhuangluan@...ilicon.com,
kongfei@...ilicon.com
Subject: Re: [PATCH v3 1/2] PCI: kirin: Add MSI support
On Fri, May 11, 2018 at 12:15 PM, Yao Chen <chenyao11@...wei.com> wrote:
> Add support for MSI.
> + int ret;
> +
> + if (IS_ENABLED(CONFIG_PCI_MSI)) {
> + pci->pp.msi_irq = platform_get_irq(pdev, 0);
> + if (pci->pp.msi_irq < 0) {
> + dev_err(&pdev->dev, "failed to get MSI IRQ (%d)\n",
> + pci->pp.msi_irq);
> + return -ENODEV;
Why shadowing actual error code?
> + }
> + ret = devm_request_irq(&pdev->dev, pci->pp.msi_irq,
> + kirin_pcie_msi_irq_handler,
> + IRQF_SHARED | IRQF_NO_THREAD,
> + "kirin_pcie_msi", &pci->pp);
> + if (ret) {
> + dev_err(&pdev->dev, "failed to request MSI IRQ %d\n",
> + pci->pp.msi_irq);
> + return ret;
> + }
It would be easy to read and maintain if this would be a separate function.
> + }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists