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>
This commit is contained in:
Julius Werner
2022-01-21 17:06:20 -08:00
parent 266041f0e6
commit e9665959ed
129 changed files with 306 additions and 330 deletions

View File

@@ -625,7 +625,7 @@ static void cpu_bus_scan(struct device *dev)
/* 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;

View File

@@ -195,8 +195,7 @@ void enter_raminit_or_reset(void)
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. */
}

View File

@@ -328,7 +328,7 @@ static int intel_gma_init_lvds(struct northbridge_intel_i945_config *conf,
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 @@ static int intel_gma_init_lvds(struct northbridge_intel_i945_config *conf,
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",

View File

@@ -9,7 +9,7 @@ enum platform_type get_platform_type(void)
{
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;
}