device/pci_device.c: Do not complain about disabled devices

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 <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Angel Pons 2020-07-23 22:40:22 +02:00
parent dfa051a21d
commit ad247ac5d8
1 changed files with 4 additions and 0 deletions

View File

@ -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));