linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kw@linux.com>
To: Xiaofei Tan <tanxiaofei@huawei.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: Thu, 4 Feb 2021 22:50:00 +0100	[thread overview]
Message-ID: <YBxsCPEFe0lxhDMO@rocinante> (raw)
In-Reply-To: <1612420127-6447-1-git-send-email-tanxiaofei@huawei.com>

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?

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

Krzysztof

  reply	other threads:[~2021-02-04 21:51 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 [this message]
2021-02-05  1:20   ` tanxiaofei

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=YBxsCPEFe0lxhDMO@rocinante \
    --to=kw@linux.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=helgaas@kernel.org \
    --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 \
    --cc=tanxiaofei@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).