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/drivers/analogix/anx7625/anx7625.c b/src/drivers/analogix/anx7625/anx7625.c
index 81f27d0..e3a5111 100644
--- a/src/drivers/analogix/anx7625/anx7625.c
+++ b/src/drivers/analogix/anx7625/anx7625.c
@@ -11,7 +11,7 @@
 #include "anx7625.h"
 
 #define ANXERROR(format, ...) \
-		printk(BIOS_ERR, "ERROR: %s: " format, __func__, ##__VA_ARGS__)
+		printk(BIOS_ERR, "%s: " format, __func__, ##__VA_ARGS__)
 #define ANXINFO(format, ...) \
 		printk(BIOS_INFO, "%s: " format, __func__, ##__VA_ARGS__)
 #define ANXDEBUG(format, ...) \
diff --git a/src/drivers/i2c/max98390/max98390.c b/src/drivers/i2c/max98390/max98390.c
index 08ed625..664a710 100644
--- a/src/drivers/i2c/max98390/max98390.c
+++ b/src/drivers/i2c/max98390/max98390.c
@@ -73,7 +73,7 @@
 					CONFIG_MAINBOARD_PART_NUMBER);
 
 			if (chars >= sizeof(dsm_name))
-				printk(BIOS_ERR, "ERROR: String too long in %s\n", __func__);
+				printk(BIOS_ERR, "String too long in %s\n", __func__);
 
 			acpi_dp_add_string(dp, "maxim,dsm_param_name", dsm_name);
 		}
diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c
index 6c3471d..1423841 100644
--- a/src/drivers/i2c/tpm/cr50.c
+++ b/src/drivers/i2c/tpm/cr50.c
@@ -49,7 +49,7 @@
 	static int warning_displayed;
 
 	if (!warning_displayed) {
-		printk(BIOS_WARNING, "WARNING: %s() not implemented, wasting 20ms to wait on"
+		printk(BIOS_WARNING, "%s() not implemented, wasting 20ms to wait on"
 		       " Cr50!\n", __func__);
 		warning_displayed = 1;
 	}
diff --git a/src/drivers/intel/fsp1_1/fsp_relocate.c b/src/drivers/intel/fsp1_1/fsp_relocate.c
index 7aaba82..875fcf2 100644
--- a/src/drivers/intel/fsp1_1/fsp_relocate.c
+++ b/src/drivers/intel/fsp1_1/fsp_relocate.c
@@ -15,14 +15,14 @@
 	void *new_loc = cbfs_cbmem_alloc(prog_name(fsp_relocd),
 					 CBMEM_ID_REFCODE, &size);
 	if (new_loc == NULL) {
-		printk(BIOS_ERR, "ERROR: Unable to load FSP into memory.\n");
+		printk(BIOS_ERR, "Unable to load FSP into memory.\n");
 		return -1;
 	}
 
 	fih_offset = fsp1_1_relocate((uintptr_t)new_loc, new_loc, size);
 
 	if (fih_offset <= 0) {
-		printk(BIOS_ERR, "ERROR: FSP relocation failure.\n");
+		printk(BIOS_ERR, "FSP relocation failure.\n");
 		return -1;
 	}
 
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 3643866..b7e81f0 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -36,7 +36,7 @@
 
 	mrc_data = fsp_find_nv_storage_data(&mrc_data_size);
 	if (!mrc_data) {
-		printk(BIOS_ERR, "ERROR: FSP_NON_VOLATILE_STORAGE_HOB missing!\n");
+		printk(BIOS_ERR, "FSP_NON_VOLATILE_STORAGE_HOB missing!\n");
 		return;
 	}
 
@@ -48,7 +48,7 @@
 	 */
 	if (mrc_cache_stash_data(MRC_TRAINING_DATA, fsp_version, mrc_data,
 				mrc_data_size) < 0)
-		printk(BIOS_ERR, "ERROR: Failed to stash MRC data\n");
+		printk(BIOS_ERR, "Failed to stash MRC data\n");
 }
 
 static void do_fsp_post_memory_init(bool s3wake, uint32_t fsp_version)
@@ -64,7 +64,7 @@
 	} else if (cbmem_initialize_id_size(CBMEM_ID_FSP_RESERVED_MEMORY,
 				range_entry_size(&fsp_mem))) {
 		if (CONFIG(HAVE_ACPI_RESUME)) {
-			printk(BIOS_ERR, "ERROR: Failed to recover CBMEM in S3 resume.\n");
+			printk(BIOS_ERR, "Failed to recover CBMEM in S3 resume.\n");
 			/* Failed S3 resume, reset to come up cleanly */
 			/* FIXME: A "system" reset is likely enough: */
 			full_reset();
diff --git a/src/drivers/intel/pmc_mux/conn/conn.c b/src/drivers/intel/pmc_mux/conn/conn.c
index f238397..9fcc736 100644
--- a/src/drivers/intel/pmc_mux/conn/conn.c
+++ b/src/drivers/intel/pmc_mux/conn/conn.c
@@ -56,7 +56,7 @@
 
 	info = conn_get_cbmem_buffer();
 	if (!info || (info->port_count >= total_conn_count)) {
-		printk(BIOS_ERR, "ERROR: No space for Type-C port info!\n");
+		printk(BIOS_ERR, "No space for Type-C port info!\n");
 		return;
 	}
 
diff --git a/src/drivers/net/atl1e.c b/src/drivers/net/atl1e.c
index d5e0cdd..e44195c 100644
--- a/src/drivers/net/atl1e.c
+++ b/src/drivers/net/atl1e.c
@@ -30,7 +30,7 @@
 			ret = c - 'a' + 0x0a;
 	}
 	if (ret > 0x0f) {
-		printk(BIOS_ERR, "Error: Invalid hex digit found: "
+		printk(BIOS_ERR, "Invalid hex digit found: "
 				 "%c - 0x%02x\n", (char)c, c);
 		ret = 0;
 	}
diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c
index 2299a99..51d4fcb 100644
--- a/src/drivers/net/r8168.c
+++ b/src/drivers/net/r8168.c
@@ -76,7 +76,7 @@
 			ret = c - 'a' + 0x0a;
 	}
 	if (ret > 0x0f) {
-		printk(BIOS_ERR, "Error: Invalid hex digit found: "
+		printk(BIOS_ERR, "Invalid hex digit found: "
 				 "%c - 0x%02x\n", (char)c, c);
 		ret = 0;
 	}
@@ -94,7 +94,7 @@
 	size_t offset;
 
 	if (fmap_locate_area_as_rdev("RO_VPD", &rdev)) {
-		printk(BIOS_ERR, "Error: Couldn't find RO_VPD region.");
+		printk(BIOS_ERR, "Couldn't find RO_VPD region.");
 		return CB_ERR;
 	}
 	search_address = rdev_mmap_full(&rdev);
@@ -108,8 +108,7 @@
 			search_length);
 
 	if (offset == search_length) {
-		printk(BIOS_ERR,
-		       "Error: Could not locate '%s' in VPD\n", vpd_key);
+		printk(BIOS_ERR, "Could not locate '%s' in VPD\n", vpd_key);
 		rdev_munmap(&rdev, search_address);
 		return CB_ERR;
 	}
diff --git a/src/drivers/pc80/rtc/option.c b/src/drivers/pc80/rtc/option.c
index 1474b57..e8e2345 100644
--- a/src/drivers/pc80/rtc/option.c
+++ b/src/drivers/pc80/rtc/option.c
@@ -100,7 +100,7 @@
 	}
 
 	if (ce->config != 'e' && ce->config != 'h') {
-		printk(BIOS_ERR, "ERROR: CMOS option '%s' is not of integer type.\n", name);
+		printk(BIOS_ERR, "CMOS option '%s' is not of integer type.\n", name);
 		return CB_ERR_ARG;
 	}
 
@@ -176,7 +176,7 @@
 	}
 
 	if (ce->config != 'e' && ce->config != 'h') {
-		printk(BIOS_ERR, "ERROR: CMOS option '%s' is not of integer type.\n", name);
+		printk(BIOS_ERR, "CMOS option '%s' is not of integer type.\n", name);
 		return CB_ERR_ARG;
 	}
 
diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c
index 30b1876..9c7baa9 100644
--- a/src/drivers/spi/tpm/tpm.c
+++ b/src/drivers/spi/tpm/tpm.c
@@ -74,7 +74,7 @@
 	static int warning_displayed;
 
 	if (!warning_displayed) {
-		printk(BIOS_WARNING, "WARNING: %s() not implemented, wasting 10ms to wait on"
+		printk(BIOS_WARNING, "%s() not implemented, wasting 10ms to wait on"
 		       " Cr50!\n", __func__);
 		warning_displayed = 1;
 	}
@@ -492,7 +492,7 @@
 		/* The high bit is set, meaning that the Cr50 is already locked on a particular
 		 * value for the register, but not the one we wanted. */
 		printk(BIOS_ERR,
-		       "ERROR: Current CR50_BOARD_CFG = 0x%08x, does not match desired = 0x%08x\n",
+		       "Current CR50_BOARD_CFG = 0x%08x, does not match desired = 0x%08x\n",
 		       board_cfg_value, CR50_BOARD_CFG_VALUE);
 		return;
 	}
diff --git a/src/drivers/ti/sn65dsi86bridge/sn65dsi86bridge.c b/src/drivers/ti/sn65dsi86bridge/sn65dsi86bridge.c
index a0fcf11..806e9b2 100644
--- a/src/drivers/ti/sn65dsi86bridge/sn65dsi86bridge.c
+++ b/src/drivers/ti/sn65dsi86bridge/sn65dsi86bridge.c
@@ -194,13 +194,13 @@
 			return CB_ERR;
 		if (!wait_ms(100, !i2c_readb(bus, chip, SN_AUX_CMD_REG, &buf) &&
 				  !(buf & AUX_CMD_SEND))) {
-			printk(BIOS_ERR, "ERROR: AUX_CMD_SEND not acknowledged\n");
+			printk(BIOS_ERR, "AUX_CMD_SEND not acknowledged\n");
 			return CB_ERR;
 		}
 		if (i2c_readb(bus, chip, SN_AUX_CMD_STATUS_REG, &buf))
 			return CB_ERR;
 		if (buf & (NAT_I2C_FAIL | AUX_SHORT | AUX_DFER | AUX_RPLY_TOUT)) {
-			printk(BIOS_ERR, "ERROR: AUX command failed, status = %#x\n", buf);
+			printk(BIOS_ERR, "AUX command failed, status = %#x\n", buf);
 			return CB_ERR;
 		}
 
@@ -230,7 +230,7 @@
 		err = sn65dsi86_bridge_aux_request(bus, chip, EDID_I2C_ADDR, EDID_LENGTH,
 						   I2C_RAW_READ_AND_STOP, edid);
 	if (err) {
-		printk(BIOS_ERR, "ERROR: Failed to read EDID.\n");
+		printk(BIOS_ERR, "Failed to read EDID.\n");
 		return err;
 	}
 
@@ -249,7 +249,7 @@
 	}
 
 	if (decode_edid(edid, edid_size, out) != EDID_CONFORMANT) {
-		printk(BIOS_ERR, "ERROR: Failed to decode EDID.\n");
+		printk(BIOS_ERR, "Failed to decode EDID.\n");
 		return CB_ERR;
 	}
 
@@ -364,7 +364,7 @@
 	if (dp_rate_idx < ARRAY_SIZE(sn65dsi86_bridge_dp_rate_lut))
 		i2c_write_field(bus, chip, SN_DATARATE_CONFIG_REG, dp_rate_idx, 8, 5);
 	else
-		printk(BIOS_ERR, "ERROR: valid dp rate not found");
+		printk(BIOS_ERR, "valid dp rate not found");
 }
 
 static void sn65dsi86_bridge_set_bridge_active_timing(uint8_t bus,
@@ -407,7 +407,7 @@
 	if (!wait_ms(500,
 	    !(i2c_readb(bus, chip, SN_DPPLL_SRC_REG, &buf)) &&
 	    (buf & BIT(7)))) {
-		printk(BIOS_ERR, "ERROR: PLL lock failure\n");
+		printk(BIOS_ERR, "PLL lock failure\n");
 	}
 
 	/*
@@ -426,14 +426,14 @@
 
 		if (!wait_ms(500, !(i2c_readb(bus, chip, SN_ML_TX_MODE_REG, &buf)) &&
 				  (buf == NORMAL_MODE || buf == MAIN_LINK_OFF))) {
-			printk(BIOS_ERR, "ERROR: unexpected link training state: %#x\n", buf);
+			printk(BIOS_ERR, "unexpected link training state: %#x\n", buf);
 			return;
 		}
 		if (buf == NORMAL_MODE)
 			return;
 	}
 
-	printk(BIOS_ERR, "ERROR: Link training failed 10 times\n");
+	printk(BIOS_ERR, "Link training failed 10 times\n");
 }
 
 void sn65dsi86_backlight_enable(uint8_t bus, uint8_t chip)
diff --git a/src/drivers/vpd/vpd.c b/src/drivers/vpd/vpd.c
index a099b3b..396097c 100644
--- a/src/drivers/vpd/vpd.c
+++ b/src/drivers/vpd/vpd.c
@@ -67,7 +67,7 @@
 
 	/* Try if we can find a google_vpd_info, otherwise read whole VPD. */
 	if (rdev_readat(rdev, &info, 0, sizeof(info)) != sizeof(info)) {
-		printk(BIOS_ERR, "ERROR: Failed to read %s header.\n",
+		printk(BIOS_ERR, "Failed to read %s header.\n",
 		       fmap_name);
 		goto fail;
 	}
@@ -75,13 +75,13 @@
 	if (memcmp(info.header.magic, VPD_INFO_MAGIC, sizeof(info.header.magic))
 	    == 0) {
 		if (rdev_chain(rdev, rdev, sizeof(info), info.size)) {
-			printk(BIOS_ERR, "ERROR: %s info size too large.\n",
+			printk(BIOS_ERR, "%s info size too large.\n",
 			       fmap_name);
 			goto fail;
 		}
 	} else if (info.header.tlv.type == VPD_TYPE_TERMINATOR ||
 		   info.header.tlv.type == VPD_TYPE_IMPLICIT_TERMINATOR) {
-		printk(BIOS_WARNING, "WARNING: %s is uninitialized or empty.\n",
+		printk(BIOS_WARNING, "%s is uninitialized or empty.\n",
 		       fmap_name);
 		goto fail;
 	}
@@ -151,7 +151,7 @@
 
 	if (ro_size) {
 		if (rdev_readat(&ro_vpd, cbmem->blob, 0, ro_size) != ro_size) {
-			printk(BIOS_ERR, "ERROR: Couldn't read RO VPD\n");
+			printk(BIOS_ERR, "Couldn't read RO VPD\n");
 			cbmem->ro_size = ro_size = 0;
 		}
 		timestamp_add_now(TS_END_COPYVPD_RO);
@@ -160,7 +160,7 @@
 	if (rw_size) {
 		if (rdev_readat(&rw_vpd, cbmem->blob + ro_size, 0, rw_size)
 								 != rw_size) {
-			printk(BIOS_ERR, "ERROR: Couldn't read RW VPD\n");
+			printk(BIOS_ERR, "Couldn't read RW VPD\n");
 			cbmem->rw_size = rw_size = 0;
 		}
 		timestamp_add_now(TS_END_COPYVPD_RW);
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c
index f4ffa5e..7c606f9 100644
--- a/src/drivers/wifi/generic/acpi.c
+++ b/src/drivers/wifi/generic/acpi.c
@@ -212,7 +212,7 @@
 	 * })
 	 */
 	if (sar->revision > MAX_SAR_REVISION) {
-		printk(BIOS_ERR, "ERROR: Invalid SAR table revision: %d\n", sar->revision);
+		printk(BIOS_ERR, "Invalid SAR table revision: %d\n", sar->revision);
 		return;
 	}
 
@@ -258,12 +258,12 @@
 	 * })
 	 */
 	if (sar->revision > MAX_SAR_REVISION) {
-		printk(BIOS_ERR, "ERROR: Invalid SAR table revision: %d\n", sar->revision);
+		printk(BIOS_ERR, "Invalid SAR table revision: %d\n", sar->revision);
 		return;
 	}
 
 	if (sar->dsar_set_count == 0) {
-		printk(BIOS_WARNING, "WARNING: DSAR set count is 0\n");
+		printk(BIOS_WARNING, "DSAR set count is 0\n");
 		return;
 	}
 
@@ -341,7 +341,7 @@
 	 * })
 	 */
 	if (wgds->revision > MAX_GEO_OFFSET_REVISION) {
-		printk(BIOS_ERR, "ERROR: Invalid WGDS revision: %d\n", wgds->revision);
+		printk(BIOS_ERR, "Invalid WGDS revision: %d\n", wgds->revision);
 		return;
 	}
 
@@ -475,7 +475,7 @@
 
 	/* Retrieve the sar limits data */
 	if (get_wifi_sar_limits(&sar_limits) < 0) {
-		printk(BIOS_ERR, "ERROR: failed getting SAR limits!\n");
+		printk(BIOS_ERR, "failed getting SAR limits!\n");
 		return;
 	}