[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <99B4C6BADD9E3241B25E52B02BA737C54127E3BF@DGGEMA505-MBS.china.huawei.com>
Date: Mon, 14 May 2018 01:11:10 +0000
From: songxiaowei <songxiaowei@...ilicon.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>,
"chenyao (F)" <chenyao11@...wei.com>
CC: Wangbinghui <wangbinghui@...ilicon.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"xuwei (O)" <xuwei5@...wei.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-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" <dimitrysh@...gle.com>,
"guodong.xu@...aro.org" <guodong.xu@...aro.org>,
Suzhuangluan <suzhuangluan@...ilicon.com>,
Kongfei <kongfei@...ilicon.com>
Subject: reply: [PATCH v3 1/2] PCI: kirin: Add MSI support
Hi, Andy Shevchenko
Yao is on maternity leave, and I'll take over the job after discussing with her.
> -----邮件原件-----
> 发件人: Andy Shevchenko [mailto:andy.shevchenko@...il.com]
> 发送时间: 2018年5月14日 7:16
> 收件人: chenyao (F) <chenyao11@...wei.com>
> 抄送: songxiaowei <songxiaowei@...ilicon.com>; Wangbinghui
> <wangbinghui@...ilicon.com>; Lorenzo Pieralisi <lorenzo.pieralisi@....com>;
> Bjorn Helgaas <bhelgaas@...gle.com>; xuwei (O) <xuwei5@...wei.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 <suzhuangluan@...ilicon.com>; Kongfei
> <kongfei@...ilicon.com>
> 主题: 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?
[songxiaowei] Sorry, I can't get your point about this, would you explain it for me.
>
> > + }
> > + 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.
[songxiaowei] Yes, a separate function will be better, and I'll fix it.
>
> > + }
>
>
>
> --
> With Best Regards,
> Andy Shevchenko
Thanks a lot,
Best Regards,
Xiaowei Song
Powered by blists - more mailing lists