PCI: Unify ACS quirk desired vs provided checking
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 6 Sep 2019 23:36:06 +0000 (18:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 May 2020 06:48:49 +0000 (08:48 +0200)
commitd2481b5d1257c2c47181ee735741ac4dc547f365
treee3de2cf1ab9f8e08e0b51fdf8d475d2e4f8f86b7
parent981fd6ad2a5a4527eaf2f1f5ebdca479333ccd99
PCI: Unify ACS quirk desired vs provided checking

commit 7cf2cba43f15c74bac46dc5f0326805d25ef514d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/quirks.c