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/lib/timestamp.c b/src/lib/timestamp.c
index f8e4ab8..b92975f 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -114,7 +114,7 @@
tse->entry_stamp = ts_time;
if (ts_table->num_entries == ts_table->max_entries)
- printk(BIOS_ERR, "ERROR: Timestamp table full\n");
+ printk(BIOS_ERR, "Timestamp table full\n");
}
void timestamp_add(enum timestamp_id id, int64_t ts_time)
@@ -127,7 +127,7 @@
ts_table = timestamp_table_get();
if (!ts_table) {
- printk(BIOS_ERR, "ERROR: No timestamp table found\n");
+ printk(BIOS_ERR, "No timestamp table found\n");
return;
}
@@ -155,7 +155,7 @@
ts_cache = timestamp_cache_get();
if (!ts_cache) {
- printk(BIOS_ERR, "ERROR: No timestamp cache to init\n");
+ printk(BIOS_ERR, "No timestamp cache to init\n");
return;
}
@@ -170,7 +170,7 @@
ts_cache_table = timestamp_table_get();
if (!ts_cache_table) {
- printk(BIOS_ERR, "ERROR: No timestamp cache found\n");
+ printk(BIOS_ERR, "No timestamp cache found\n");
return;
}
@@ -223,7 +223,7 @@
}
if (ts_cbmem_table == NULL) {
- printk(BIOS_ERR, "ERROR: No timestamp table allocated\n");
+ printk(BIOS_ERR, "No timestamp table allocated\n");
timestamp_table_set(NULL);
return;
}
@@ -253,7 +253,7 @@
/* No timestamp table found */
if (ts_table == NULL) {
- printk(BIOS_ERR, "ERROR: No timestamp table found\n");
+ printk(BIOS_ERR, "No timestamp table found\n");
return;
}