diff options
author | Borislav Petkov <bp@suse.de> | 2016-12-01 11:35:07 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2016-12-01 11:35:07 +0100 |
commit | 5246c540073fb3d6f9aae87215f297e4895e89b3 (patch) | |
tree | 804e0ebcd57a7ab5925f8e2c5addfafe19324b17 /drivers/edac/amd64_edac.c | |
parent | 95d3af6bd18f381b5b1c62f117ce7f152a5db3ea (diff) | |
download | linux-5246c540073fb3d6f9aae87215f297e4895e89b3.tar.bz2 |
EDAC, amd64: Improve amd64-specific printing macros
Prefix the warn and error macros with the respective string so that
callers don't have to say "Error" or "Warning". We save us string length
this way in the actual calls.
While at it, shorten the calls in reserve_mc_sibling_devs().
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r-- | drivers/edac/amd64_edac.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index df6d650a8e47..9a7cf3c8df06 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2528,8 +2528,7 @@ reserve_mc_sibling_devs(struct amd64_pvt *pvt, u16 pci_id1, u16 pci_id2) if (pvt->umc) { pvt->F0 = pci_get_related_function(pvt->F3->vendor, pci_id1, pvt->F3); if (!pvt->F0) { - amd64_err("error F0 device not found: vendor %x device 0x%x (broken BIOS?)\n", - PCI_VENDOR_ID_AMD, pci_id1); + amd64_err("F0 not found, device 0x%x (broken BIOS?)\n", pci_id1); return -ENODEV; } @@ -2538,11 +2537,10 @@ reserve_mc_sibling_devs(struct amd64_pvt *pvt, u16 pci_id1, u16 pci_id2) pci_dev_put(pvt->F0); pvt->F0 = NULL; - amd64_err("error F6 device not found: vendor %x device 0x%x (broken BIOS?)\n", - PCI_VENDOR_ID_AMD, pci_id2); - + amd64_err("F6 not found: device 0x%x (broken BIOS?)\n", pci_id2); return -ENODEV; } + edac_dbg(1, "F0: %s\n", pci_name(pvt->F0)); edac_dbg(1, "F3: %s\n", pci_name(pvt->F3)); edac_dbg(1, "F6: %s\n", pci_name(pvt->F6)); @@ -2553,8 +2551,7 @@ reserve_mc_sibling_devs(struct amd64_pvt *pvt, u16 pci_id1, u16 pci_id2) /* Reserve the ADDRESS MAP Device */ pvt->F1 = pci_get_related_function(pvt->F3->vendor, pci_id1, pvt->F3); if (!pvt->F1) { - amd64_err("error address map device not found: vendor %x device 0x%x (broken BIOS?)\n", - PCI_VENDOR_ID_AMD, pci_id1); + amd64_err("F1 not found: device 0x%x (broken BIOS?)\n", pci_id1); return -ENODEV; } @@ -2564,9 +2561,8 @@ reserve_mc_sibling_devs(struct amd64_pvt *pvt, u16 pci_id1, u16 pci_id2) pci_dev_put(pvt->F1); pvt->F1 = NULL; - amd64_err("error F2 device not found: vendor %x device 0x%x (broken BIOS?)\n", - PCI_VENDOR_ID_AMD, pci_id2); - return -ENODEV; + amd64_err("F2 not found: device 0x%x (broken BIOS?)\n", pci_id2); + return -ENODEV; } edac_dbg(1, "F1: %s\n", pci_name(pvt->F1)); |