]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: Simplify size1 assignment logic
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 16 Dec 2024 17:56:10 +0000 (19:56 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 18 Feb 2025 21:40:52 +0000 (15:40 -0600)
commita55bf64b30e4ee04c8f690e2c3d0924beb7fbd62
treeaff3b80fd8b830cdceed0db4d30d626a7b1db6fb
parent1f82b7e84a09cac05ec24cd8dbc68d7fe9ba0d97
PCI: Simplify size1 assignment logic

In pbus_size_io() and pbus_size_mem(), a complex ?: operation is performed
to set size1.  Decompose this so it's easier to read.

In the case of pbus_size_mem(), simply initializing size1 to zero ensures
the size1 checks work as expected.

Link: https://lore.kernel.org/r/20241216175632.4175-4-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Xiaochun Lee <lixc17@lenovo.com>
drivers/pci/setup-bus.c