Commit e3bdd2d
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>1 parent 9d3faf2 commit e3bdd2d
1 file changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1894 | 1894 | | |
1895 | 1895 | | |
1896 | 1896 | | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
1897 | 1900 | | |
1898 | 1901 | | |
1899 | 1902 | | |
| |||
2005 | 2008 | | |
2006 | 2009 | | |
2007 | 2010 | | |
2008 | | - | |
2009 | | - | |
| 2011 | + | |
2010 | 2012 | | |
2011 | 2013 | | |
2012 | 2014 | | |
| |||
2018 | 2020 | | |
2019 | 2021 | | |
2020 | 2022 | | |
2021 | | - | |
2022 | | - | |
| 2023 | + | |
| 2024 | + | |
2023 | 2025 | | |
2024 | 2026 | | |
2025 | 2027 | | |
2026 | 2028 | | |
2027 | 2029 | | |
2028 | | - | |
2029 | | - | |
| 2030 | + | |
2030 | 2031 | | |
2031 | 2032 | | |
2032 | 2033 | | |
| |||
0 commit comments