[PATCH 03/10] PCI: Factor out bridge window probing from pci_read_bridge_windows()

Josh Hilke jrhilke at google.com
Tue Oct 20 22:19:46 PDT 2026


On Mon, Oct 19, 2026 at 09:30:47PM +0000, David Matlack wrote:
> +     pci_probe_bridge_windows(bridge);
> +
> +     if (bridge->io_window)
> +             pci_read_bridge_io(bridge, &res, true);
> +
> +     pci_read_bridge_mmio(bridge, &res, true);
>
> -     pci_read_bridge_mmio_pref(bridge, &res, true);
> +     if (bridge->pref_window)
> +             pci_read_bridge_mmio_pref(bridge, &res, true);

These two if-statements are redundant and can be removed.
pci_read_bridge_io() and pci_read_bridge_mmio_pref() already return
early when io_window and pref_window are 0.

Thanks,
Josh Hilke



More information about the kexec mailing list