From 695d74985e130bdb7d174bde6ce6bb9be54e5dae Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Tue, 16 Dec 2008 18:32:01 +0000 Subject: [PATCH] This patch cleans up a little whitespace and makes the ID mismatch error more verbose in pci_rom.c. Suggested by Pattrick on the list. Trivial. Signed-off-by: Myles Watson Acked-by: Myles Watson git-svn-id: svn://coreboot.org/repository/coreboot-v3@1072 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- device/pci_rom.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/device/pci_rom.c b/device/pci_rom.c index 443f52b62d..48dd1e0635 100644 --- a/device/pci_rom.c +++ b/device/pci_rom.c @@ -46,7 +46,7 @@ struct rom_header *pci_rom_probe(struct device *dev) */ init_archive(&archive); sprintf(pcifile, "pci%04x,%04x.rom", dev->id.pci.vendor, - dev->id.pci.device); + dev->id.pci.device); ret = find_file(&archive, pcifile, &result); if (ret) { @@ -100,21 +100,22 @@ struct rom_header *pci_rom_probe(struct device *dev) /* checksum */ rom_bytes = (unsigned char *)rom_address; for (i = 0; i < rom_header->size * 512; i++) - sum += *(rom_bytes + i); + sum += *(rom_bytes + i); if (sum != 0) - printk(BIOS_ALERT, "Incorrent Expansion ROM checksum (%02x != 0)\n", sum); + printk(BIOS_ALERT, "Expansion ROM checksum %02x != 0!\n", sum); rom_data = (struct pci_data *)((unsigned char *)rom_header + le32_to_cpu(rom_header->data)); printk(BIOS_SPEW, "PCI ROM Image, @%p, Vendor %04x, Device %04x,\n", - &rom_data->vendor, - rom_data->vendor, rom_data->device); - if (dev->id.pci.vendor != rom_data->vendor || dev->id.pci.device != rom_data->device) { - printk(BIOS_ERR, - "Device or Vendor ID mismatch Vendor %04x, Device %04x\n", + &rom_data->vendor, rom_data->vendor, rom_data->device); + if (dev->id.pci.vendor != rom_data->vendor || + dev->id.pci.device != rom_data->device) { + printk(BIOS_ERR, "ROM ID mismatch: Vendor %04x, Device %04x\n", rom_data->vendor, rom_data->device); + printk(BIOS_ERR, "Expected: Vendor %04x, Device %04x\n", + dev->id.pci.vendor, dev->id.pci.device); return NULL; }