linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tanxiaofei <tanxiaofei@huawei.com>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: <helgaas@kernel.org>,
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	<sean.v.kelley@intel.com>, <Jonathan.Cameron@huawei.com>,
	<refactormyself@gmail.com>, <linux-pci@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH 1/1] PCI/AER: Change to use helper pcie_aer_is_native() in some places
Date: Fri, 5 Feb 2021 09:20:59 +0800	[thread overview]
Message-ID: <064df5a3-3a55-544e-b9d0-314abade1ace@huawei.com> (raw)
In-Reply-To: <YBxsCPEFe0lxhDMO@rocinante>

Hi Krzysztof,

On 2021/2/5 5:50, Krzysztof Wilczyński wrote:
> Hi Tan,
>
> This is very nice!  Thank you for this.
>
> [...]
>>  	if (dev->aer_cap && pci_aer_available() &&
>> -	    (pcie_ports_native || host->native_aer)) {
>> +	    pcie_aer_is_native(dev)) {
>>  		services |= PCIE_PORT_SERVICE_AER;
> [...]
>
> A suggestion.  You could improve this even further, for example:
>
>   if (pci_aer_available() && pcie_aer_is_native(dev)) {
>
> This is because the pcie_aer_is_native() function performs the
> dev->aer_cap check internally, so we could rely on it, and avoid
> checking the same thing twice.
>
> What do you think?
>

Yes, it's better, i will send v2 patch including this.thanks.

> Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
>
> Krzysztof
>
> .
>


      reply	other threads:[~2021-02-05  1:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  6:28 [PATCH 1/1] PCI/AER: Change to use helper pcie_aer_is_native() in some places Xiaofei Tan
2021-02-04 21:50 ` Krzysztof Wilczyński
2021-02-05  1:20   ` tanxiaofei [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=064df5a3-3a55-544e-b9d0-314abade1ace@huawei.com \
    --to=tanxiaofei@huawei.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=helgaas@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=refactormyself@gmail.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=sean.v.kelley@intel.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).