From ad247ac5d8ef4a38bd1d61fbd28076f343a46c5c Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 23 Jul 2020 22:40:22 +0200 Subject: device/pci_device.c: Do not complain about disabled devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One would expect disabled devices to not be present. So, don't print misleading warnings about it, because it only confuses people. Change-Id: I0f14174a1d460a479dc9f15b63486f4f27b8f67c Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/43767 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh Reviewed-by: Kyösti Mälkki --- src/device/pci_device.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/device') diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 3623c3b564..f3cced94f0 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -1297,6 +1297,10 @@ void pci_scan_bus(struct bus *bus, unsigned int min_devfn, /* Unlink it from list. */ *prev = dev->sibling; + /* If disabled in devicetree, do not print any messages. */ + if (!dev->enabled) + continue; + if (!once++) printk(BIOS_WARNING, "PCI: Leftover static devices:\n"); printk(BIOS_WARNING, "%s\n", dev_path(dev)); -- cgit v1.2.3