lkml.org 
[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] PCI/AER: Change to use helper pcie_aer_is_native() in some places
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

\
 
 \ /
  Last update: 2021-02-04 22:53    [W:0.045 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site