treewide: Remove "ERROR: "/"WARN: " prefixes from log messages
Now that the console system itself will clearly differentiate loglevels,
it is no longer necessary to explicitly add "ERROR: " in front of every
BIOS_ERR message to help it stand out more (and allow automated tooling
to grep for it). Removing all these extra .rodata characters should save
us a nice little amount of binary size.
This patch was created by running
find src/ -type f -exec perl -0777 -pi -e 's/printk\(\s*BIOS_ERR,\s*"ERROR: /printk\(BIOS_ERR, "/gi' '{}' ';'
and doing some cursory review/cleanup on the result. Then doing the same
thing for BIOS_WARN with
's/printk\(\s*BIOS_WARNING,\s*"WARN(ING)?: /printk\(BIOS_WARNING, "/gi'
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I3d0573acb23d2df53db6813cb1a5fc31b5357db8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61309
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Lance Zhao
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c
index 4b4ab67..2d9597e 100644
--- a/src/northbridge/amd/agesa/family14/northbridge.c
+++ b/src/northbridge/amd/agesa/family14/northbridge.c
@@ -625,7 +625,7 @@
/* There is only one node for fam14, but there may be multiple cores. */
cpu = pcidev_on_root(0x18, 0);
if (!cpu)
- printk(BIOS_ERR, "ERROR: %02x:%02x.0 not found", 0, 0x18);
+ printk(BIOS_ERR, "%02x:%02x.0 not found", 0, 0x18);
cores_found = (pci_read_config32(pcidev_on_root(0x18, 0x3),
0xe8) >> 12) & 3;
diff --git a/src/northbridge/intel/gm45/raminit.c b/src/northbridge/intel/gm45/raminit.c
index e7663b9..6e505da 100644
--- a/src/northbridge/intel/gm45/raminit.c
+++ b/src/northbridge/intel/gm45/raminit.c
@@ -195,8 +195,7 @@
if (reg8 & (1 << 2)) { /* S4-assertion-width violation */
/* Ignore S4-assertion-width violation like original BIOS. */
- printk(BIOS_WARNING,
- "WARNING: Ignoring S4-assertion-width violation.\n");
+ printk(BIOS_WARNING, "Ignoring S4-assertion-width violation.\n");
/* Bit2 is R/WC, so it will clear itself below. */
}
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index 99d3c21..d094a67 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -328,7 +328,7 @@
write32(mmiobase + EIR, 0xffffffff);
if (gtt_setup(mmiobase)) {
- printk(BIOS_ERR, "ERROR: GTT Setup Failed!!!\n");
+ printk(BIOS_ERR, "GTT Setup Failed!!!\n");
return 0;
}
@@ -352,7 +352,7 @@
if (temp & 1)
printk(BIOS_INFO, "GTT Enabled\n");
else
- printk(BIOS_ERR, "ERROR: GTT is still Disabled!!!\n");
+ printk(BIOS_ERR, "GTT is still Disabled!!!\n");
if (CONFIG(LINEAR_FRAMEBUFFER)) {
printk(BIOS_SPEW, "memset %p to 0x00 for %d bytes\n",
diff --git a/src/northbridge/intel/sandybridge/common.c b/src/northbridge/intel/sandybridge/common.c
index 5cd49cc..a8f718c 100644
--- a/src/northbridge/intel/sandybridge/common.c
+++ b/src/northbridge/intel/sandybridge/common.c
@@ -9,7 +9,7 @@
{
const int id = get_platform_id();
if (id != 1 && id != 4)
- printk(BIOS_WARNING, "WARN: Unknown platform id 0x%x\n", id);
+ printk(BIOS_WARNING, "Unknown platform id 0x%x\n", id);
return (id == 4) ? PLATFORM_MOBILE : PLATFORM_DESKTOP_SERVER;
}