device/pci_rom: Make ON_DEVICE_ROM_LOAD condition truthy

Truthy conditions are easier to reason about.

BUG=none
TEST=Boot guybrush

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I229c3e90f5122d6191b28f9b4b6de79ac2fcb627
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56401
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
Raul E Rangel 2021-07-16 15:06:56 -06:00 committed by Felix Held
parent 69cb69f35f
commit ad5307e46c
1 changed files with 5 additions and 5 deletions

View File

@ -68,11 +68,7 @@ struct rom_header *pci_rom_probe(const struct device *dev)
if (rom_header) { if (rom_header) {
printk(BIOS_DEBUG, "In CBFS, ROM address for %s = %p\n", printk(BIOS_DEBUG, "In CBFS, ROM address for %s = %p\n",
dev_path(dev), rom_header); dev_path(dev), rom_header);
} else if (!CONFIG(ON_DEVICE_ROM_LOAD)) { } else if (CONFIG(ON_DEVICE_ROM_LOAD)) {
printk(BIOS_DEBUG, "PCI Option ROM loading disabled for %s\n",
dev_path(dev));
return NULL;
} else {
uintptr_t rom_address; uintptr_t rom_address;
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
@ -93,6 +89,10 @@ struct rom_header *pci_rom_probe(const struct device *dev)
printk(BIOS_DEBUG, "Option ROM address for %s = %lx\n", printk(BIOS_DEBUG, "Option ROM address for %s = %lx\n",
dev_path(dev), (unsigned long)rom_address); dev_path(dev), (unsigned long)rom_address);
rom_header = (struct rom_header *)rom_address; rom_header = (struct rom_header *)rom_address;
} else {
printk(BIOS_DEBUG, "PCI Option ROM loading disabled for %s\n",
dev_path(dev));
return NULL;
} }
printk(BIOS_SPEW, printk(BIOS_SPEW,