]> www.infradead.org Git - users/willy/xarray.git/commit
PCI: Add ALIGN_DOWN_IF_NONZERO() helper
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 14 Jun 2024 10:06:06 +0000 (13:06 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Oct 2024 22:47:08 +0000 (17:47 -0500)
commite3bdd2dd3f618d0bb9f500aae17df2b4f726dca1
treedc6019767bac220825d18a645993165e021a78a8
parent9d3faf229c06d953999e2aa6b6dbb57afd252f26
PCI: Add ALIGN_DOWN_IF_NONZERO() helper

pci_bus_distribute_available_resources() performs alignment in case of
non-zero alignment requirement on three occasions.

Add ALIGN_DOWN_IF_NONZERO() helper to avoid coding the non-zero check three
times.

Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240614100606.15830-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/pci/setup-bus.c