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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy Shevchenko

> -----邮件原件-----
> 发件人: Andy Shevchenko [mailto:andy.shevchenko@xxxxxxxxx]
> 发送时间: 2018年5月14日 15:17
> 收件人: songxiaowei <songxiaowei@xxxxxxxxxxxxx>
> 抄送: chenyao (F) <chenyao11@xxxxxxxxxx>; Wangbinghui
> <wangbinghui@xxxxxxxxxxxxx>; Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>;
> Bjorn Helgaas <bhelgaas@xxxxxxxxxx>; xuwei (O) <xuwei5@xxxxxxxxxx>;
> Rob Herring <robh+dt@xxxxxxxxxx>; Mark Rutland <mark.rutland@xxxxxxx>;
> Catalin Marinas <catalin.marinas@xxxxxxx>; Will Deacon
> <will.deacon@xxxxxxx>; linux-pci@xxxxxxxxxxxxxxx; Linux Kernel Mailing List
> <linux-kernel@xxxxxxxxxxxxxxx>; linux-arm Mailing List
> <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>; devicetree
> <devicetree@xxxxxxxxxxxxxxx>; dimitrysh@xxxxxxxxxx;
> guodong.xu@xxxxxxxxxx; Suzhuangluan <suzhuangluan@xxxxxxxxxxxxx>; Kongfei
> <kongfei@xxxxxxxxxxxxx>
> 主题: Re: reply: [PATCH v3 1/2] PCI: kirin: Add MSI support
> 
> On Mon, May 14, 2018 at 4:11 AM, songxiaowei <songxiaowei@xxxxxxxxxxxxx>
> 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.
��.n��������+%������w��{.n����z�{��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux