PCI: Unify ACS quirk desired vs provided checking
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 6 Sep 2019 23:36:06 +0000 (18:36 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 14 Nov 2019 23:44:48 +0000 (17:44 -0600)
commit7cf2cba43f15c74bac46dc5f0326805d25ef514d
treed5ba31187c34ea7f54e0253c51c248a6847d50b0
parentc8de8ed2dcaac82e5d76d467dc0b02e0ee79809b
PCI: Unify ACS quirk desired vs provided checking

Most of the ACS quirks have a similar pattern of:

  acs_flags &= ~( <controls provided by this device> );
  return acs_flags ? 0 : 1;

Pull this out into a helper function to simplify the quirks slightly.  The
helper function is also a convenient place for comments about what the list
of ACS controls means.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
drivers/pci/quirks.c