答复: reply: [PATCH v3 1/2] PCI: kirin: Add MSI support

songxiaowei songxiaowei at hisilicon.com
Mon May 14 00:40:17 PDT 2018


Hi Andy Shevchenko

> -----邮件原件-----
> 发件人: Andy Shevchenko [mailto:andy.shevchenko at gmail.com]
> 发送时间: 2018年5月14日 15:17
> 收件人: songxiaowei <songxiaowei at hisilicon.com>
> 抄送: chenyao (F) <chenyao11 at huawei.com>; Wangbinghui
> <wangbinghui at hisilicon.com>; Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>;
> Bjorn Helgaas <bhelgaas at google.com>; xuwei (O) <xuwei5 at huawei.com>;
> Rob Herring <robh+dt at kernel.org>; Mark Rutland <mark.rutland at arm.com>;
> Catalin Marinas <catalin.marinas at arm.com>; Will Deacon
> <will.deacon at arm.com>; linux-pci at vger.kernel.org; Linux Kernel Mailing List
> <linux-kernel at vger.kernel.org>; linux-arm Mailing List
> <linux-arm-kernel at lists.infradead.org>; devicetree
> <devicetree at vger.kernel.org>; dimitrysh at google.com;
> guodong.xu at linaro.org; Suzhuangluan <suzhuangluan at hisilicon.com>; Kongfei
> <kongfei at hisilicon.com>
> 主题: Re: reply: [PATCH v3 1/2] PCI: kirin: Add MSI support
> 
> On Mon, May 14, 2018 at 4:11 AM, songxiaowei <songxiaowei at hisilicon.com>
> wrote:
> 
> >> > +       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.
> 
> platform_get_irq() returns either correct IRQ number or negative error code.
> In the code above you shadow the actual error (as returned by that
> call) by -ENODEV. Any reason why?
> 
[songxiaowei] I guess the reason is that she wanted to keep the same with other hosts,
           So, you'd like to use "return pci->pp.msi_irq " instead of " return -ENODEV ".
> --
> With Best Regards,
> Andy Shevchenko

Thanks a lot,
Xiaowei.


More information about the linux-arm-kernel mailing list