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:
@@ -52,7 +52,7 @@ static bool decompress_kernel_header(const struct fit_image_node *node)
|
||||
scratch.raw, sizeof(scratch.raw));
|
||||
break;
|
||||
default:
|
||||
printk(BIOS_ERR, "ERROR: Unsupported compression algorithm!\n");
|
||||
printk(BIOS_ERR, "Unsupported compression algorithm!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,8 +61,7 @@ static bool decompress_kernel_header(const struct fit_image_node *node)
|
||||
die("ERROR: Partial decompression ran over scratchbuf!\n");
|
||||
|
||||
if (scratch.header.magic != KERNEL_HEADER_MAGIC) {
|
||||
printk(BIOS_ERR,
|
||||
"ERROR: Invalid kernel magic: %#.8x\n != %#.8x\n",
|
||||
printk(BIOS_ERR, "Invalid kernel magic: %#.8x\n != %#.8x\n",
|
||||
scratch.header.magic, KERNEL_HEADER_MAGIC);
|
||||
return false;
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ static acpi_generic_error_status_t *new_bert_status(void)
|
||||
status = bert_allocate_storage(sizeof(*status));
|
||||
|
||||
if (!status) {
|
||||
printk(BIOS_ERR, "Error: New BERT error entry would exceed available region\n");
|
||||
printk(BIOS_ERR, "New BERT error entry would exceed available region\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -159,13 +159,13 @@ static acpi_hest_generic_data_v300_t *new_generic_error_entry(
|
||||
acpi_hest_generic_data_v300_t *entry;
|
||||
|
||||
if (bert_entry_count(status) == GENERIC_ERR_STS_ENTRY_COUNT_MAX) {
|
||||
printk(BIOS_ERR, "Error: New BERT error would exceed maximum entries\n");
|
||||
printk(BIOS_ERR, "New BERT error would exceed maximum entries\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
entry = bert_allocate_storage(sizeof(*entry));
|
||||
if (!entry) {
|
||||
printk(BIOS_ERR, "Error: New BERT error entry would exceed available region\n");
|
||||
printk(BIOS_ERR, "New BERT error entry would exceed available region\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ static size_t sizeof_error_section(guid_t *guid)
|
||||
return sizeof(cper_fw_err_rec_section_t);
|
||||
/* else if ... sizeof(structures not yet defined) */
|
||||
|
||||
printk(BIOS_ERR, "Error: Requested size of unrecognized CPER GUID\n");
|
||||
printk(BIOS_ERR, "Requested size of unrecognized CPER GUID\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ void *new_cper_fw_error_crashlog(acpi_generic_error_status_t *status, size_t cl_
|
||||
{
|
||||
void *cl_data = bert_allocate_storage(cl_size);
|
||||
if (!cl_data) {
|
||||
printk(BIOS_ERR, "Error: Crashlog entry (size %zu) would exceed available region\n",
|
||||
printk(BIOS_ERR, "Crashlog entry (size %zu) would exceed available region\n",
|
||||
cl_size);
|
||||
return NULL;
|
||||
}
|
||||
@@ -348,7 +348,7 @@ cper_ia32x64_context_t *new_cper_ia32x64_ctx(
|
||||
return NULL;
|
||||
|
||||
if (cper_ia32x64_proc_num_ctxs(x86err) == I32X64SEC_VALID_CTXNUM_MAX) {
|
||||
printk(BIOS_ERR, "Error: New IA32X64 %s context entry would exceed max allowable contexts\n",
|
||||
printk(BIOS_ERR, "New IA32X64 %s context entry would exceed max allowable contexts\n",
|
||||
ctx_names[type]);
|
||||
return NULL;
|
||||
}
|
||||
@@ -356,7 +356,7 @@ cper_ia32x64_context_t *new_cper_ia32x64_ctx(
|
||||
size = cper_ia32x64_ctx_sz_bytype(type, num);
|
||||
ctx = bert_allocate_storage(size);
|
||||
if (!ctx) {
|
||||
printk(BIOS_ERR, "Error: New IA32X64 %s context entry would exceed available region\n",
|
||||
printk(BIOS_ERR, "New IA32X64 %s context entry would exceed available region\n",
|
||||
ctx_names[type]);
|
||||
return NULL;
|
||||
}
|
||||
@@ -402,14 +402,14 @@ cper_ia32x64_proc_error_info_t *new_cper_ia32x64_check(
|
||||
return NULL;
|
||||
|
||||
if (cper_ia32x64_proc_num_chks(x86err) == I32X64SEC_VALID_ERRNUM_MAX) {
|
||||
printk(BIOS_ERR, "Error: New IA32X64 %s check entry would exceed max allowable errors\n",
|
||||
printk(BIOS_ERR, "New IA32X64 %s check entry would exceed max allowable errors\n",
|
||||
check_names[type]);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
check = bert_allocate_storage(sizeof(*check));
|
||||
if (!check) {
|
||||
printk(BIOS_ERR, "Error: New IA32X64 %s check entry would exceed available region\n",
|
||||
printk(BIOS_ERR, "New IA32X64 %s check entry would exceed available region\n",
|
||||
check_names[type]);
|
||||
return NULL;
|
||||
}
|
||||
@@ -518,7 +518,7 @@ acpi_generic_error_status_t *bert_new_event(guid_t *guid)
|
||||
size += sizeof_error_section(guid);
|
||||
|
||||
if (size > bert_storage_remaining()) {
|
||||
printk(BIOS_ERR, "Error: Not enough BERT region space to add event for type %s\n",
|
||||
printk(BIOS_ERR, "Not enough BERT region space to add event for type %s\n",
|
||||
generic_error_name(guid));
|
||||
return NULL;
|
||||
}
|
||||
@@ -571,7 +571,7 @@ cper_ia32x64_context_t *cper_new_ia32x64_context_msr(
|
||||
*/
|
||||
__weak void bert_reserved_region(void **start, size_t *size)
|
||||
{
|
||||
printk(BIOS_ERR, "Error: %s not implemented. BERT region generation disabled\n",
|
||||
printk(BIOS_ERR, "%s not implemented. BERT region generation disabled\n",
|
||||
__func__);
|
||||
*start = NULL;
|
||||
*size = 0;
|
||||
|
@@ -36,7 +36,7 @@ static unsigned long write_pirq_table(unsigned long rom_table_end)
|
||||
// much space it's going to need.
|
||||
if (new_high_table_pointer > (high_table_pointer
|
||||
+ MAX_PIRQ_TABLE_SIZE))
|
||||
printk(BIOS_ERR, "ERROR: Increase PIRQ size.\n");
|
||||
printk(BIOS_ERR, "Increase PIRQ size.\n");
|
||||
printk(BIOS_DEBUG, "PIRQ table: %ld bytes.\n",
|
||||
new_high_table_pointer - high_table_pointer);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ static unsigned long write_mptable(unsigned long rom_table_end)
|
||||
// much space it's going to need.
|
||||
if (new_high_table_pointer > (high_table_pointer
|
||||
+ MAX_MP_TABLE_SIZE))
|
||||
printk(BIOS_ERR, "ERROR: Increase MP table size.\n");
|
||||
printk(BIOS_ERR, "Increase MP table size.\n");
|
||||
|
||||
printk(BIOS_DEBUG, "MP table: %ld bytes.\n",
|
||||
new_high_table_pointer - high_table_pointer);
|
||||
@@ -102,7 +102,7 @@ static unsigned long write_acpi_table(unsigned long rom_table_end)
|
||||
new_high_table_pointer = write_acpi_tables(high_table_pointer);
|
||||
if (new_high_table_pointer > (high_table_pointer
|
||||
+ max_acpi_size))
|
||||
printk(BIOS_ERR, "ERROR: Increase ACPI size\n");
|
||||
printk(BIOS_ERR, "Increase ACPI size\n");
|
||||
printk(BIOS_DEBUG, "ACPI tables: %ld bytes.\n",
|
||||
new_high_table_pointer - high_table_pointer);
|
||||
|
||||
@@ -127,8 +127,7 @@ static unsigned long write_acpi_table(unsigned long rom_table_end)
|
||||
writes longest size available. */
|
||||
memcpy(low_rsdp, high_rsdp, sizeof(acpi_rsdp_t));
|
||||
} else {
|
||||
printk(BIOS_ERR,
|
||||
"ERROR: Didn't find RSDP in high table.\n");
|
||||
printk(BIOS_ERR, "Didn't find RSDP in high table.\n");
|
||||
}
|
||||
rom_table_end = ALIGN_UP(rom_table_end + sizeof(acpi_rsdp_t), 16);
|
||||
} else {
|
||||
@@ -159,7 +158,7 @@ static unsigned long write_smbios_table(unsigned long rom_table_end)
|
||||
|
||||
if (new_high_table_pointer > (high_table_pointer
|
||||
+ MAX_SMBIOS_SIZE))
|
||||
printk(BIOS_ERR, "ERROR: Increase SMBIOS size\n");
|
||||
printk(BIOS_ERR, "Increase SMBIOS size\n");
|
||||
printk(BIOS_DEBUG, "SMBIOS tables: %ld bytes.\n",
|
||||
new_high_table_pointer - high_table_pointer);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user