From: songxiaowei <songxiaowei@hisilicon.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "chenyao (F)" <chenyao11@huawei.com>,
Wangbinghui <wangbinghui@hisilicon.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
"xuwei (O)" <xuwei5@huawei.com>,
"Rob Herring" <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"Catalin Marinas" <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
devicetree <devicetree@vger.kernel.org>,
"dimitrysh@google.com" <dimitrysh@google.com>,
"guodong.xu@linaro.org" <guodong.xu@linaro.org>,
Suzhuangluan <suzhuangluan@hisilicon.com>,
Kongfei <kongfei@hisilicon.com>
Subject: 答复: reply: [PATCH v3 1/2] PCI: kirin: Add MSI support
Date: Mon, 14 May 2018 07:40:17 +0000 [thread overview]
Message-ID: <99B4C6BADD9E3241B25E52B02BA737C54127E490@DGGEMA505-MBS.china.huawei.com> (raw)
In-Reply-To: <CAHp75VfHfUCNKNun4-bb2BhwV6D9jg2+hzVjrDER+af0SrzqjA@mail.gmail.com>
Hi Andy Shevchenko
> -----邮件原件-----
> 发件人: Andy Shevchenko [mailto:andy.shevchenko@gmail.com]
> 发送时间: 2018年5月14日 15:17
> 收件人: songxiaowei <songxiaowei@hisilicon.com>
> 抄送: chenyao (F) <chenyao11@huawei.com>; Wangbinghui
> <wangbinghui@hisilicon.com>; Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>;
> Bjorn Helgaas <bhelgaas@google.com>; xuwei (O) <xuwei5@huawei.com>;
> Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>;
> Catalin Marinas <catalin.marinas@arm.com>; Will Deacon
> <will.deacon@arm.com>; linux-pci@vger.kernel.org; Linux Kernel Mailing List
> <linux-kernel@vger.kernel.org>; linux-arm Mailing List
> <linux-arm-kernel@lists.infradead.org>; devicetree
> <devicetree@vger.kernel.org>; dimitrysh@google.com;
> guodong.xu@linaro.org; Suzhuangluan <suzhuangluan@hisilicon.com>; Kongfei
> <kongfei@hisilicon.com>
> 主题: Re: reply: [PATCH v3 1/2] PCI: kirin: Add MSI support
>
> On Mon, May 14, 2018 at 4:11 AM, songxiaowei <songxiaowei@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.
prev parent reply other threads:[~2018-05-14 7:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 1:11 reply: [PATCH v3 1/2] PCI: kirin: Add MSI support songxiaowei
2018-05-14 7:16 ` Andy Shevchenko
2018-05-14 7:40 ` songxiaowei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=99B4C6BADD9E3241B25E52B02BA737C54127E490@DGGEMA505-MBS.china.huawei.com \
--to=songxiaowei@hisilicon.com \
--cc=andy.shevchenko@gmail.com \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=chenyao11@huawei.com \
--cc=devicetree@vger.kernel.org \
--cc=dimitrysh@google.com \
--cc=guodong.xu@linaro.org \
--cc=kongfei@hisilicon.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=suzhuangluan@hisilicon.com \
--cc=wangbinghui@hisilicon.com \
--cc=will.deacon@arm.com \
--cc=xuwei5@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).