summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2022-01-21 17:06:20 -0800
committerJulius Werner <jwerner@chromium.org>2022-02-07 23:29:09 +0000
commite9665959edeba6ae2d5364c4f7339704b6b6fd42 (patch)
treee3cd9e0e6e91c9b6bd5c6f586a9abee1d654b5dd /src/drivers
parent266041f0e62296737617cc2fcfa97f31e2b43aea (diff)
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>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/analogix/anx7625/anx7625.c2
-rw-r--r--src/drivers/i2c/max98390/max98390.c2
-rw-r--r--src/drivers/i2c/tpm/cr50.c2
-rw-r--r--src/drivers/intel/fsp1_1/fsp_relocate.c4
-rw-r--r--src/drivers/intel/fsp2_0/memory_init.c6
-rw-r--r--src/drivers/intel/pmc_mux/conn/conn.c2
-rw-r--r--src/drivers/net/atl1e.c2
-rw-r--r--src/drivers/net/r8168.c7
-rw-r--r--src/drivers/pc80/rtc/option.c4
-rw-r--r--src/drivers/spi/tpm/tpm.c4
-rw-r--r--src/drivers/ti/sn65dsi86bridge/sn65dsi86bridge.c16
-rw-r--r--src/drivers/vpd/vpd.c10
-rw-r--r--src/drivers/wifi/generic/acpi.c10
13 files changed, 35 insertions, 36 deletions
diff --git a/src/drivers/analogix/anx7625/anx7625.c b/src/drivers/analogix/anx7625/anx7625.c
index 81f27d0db0..e3a511131f 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 08ed625163..664a7109fe 100644
--- a/src/drivers/i2c/max98390/max98390.c
+++ b/src/drivers/i2c/max98390/max98390.c
@@ -73,7 +73,7 @@ static void max98390_fill_ssdt(const struct device *dev)
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 6c3471dfa7..1423841231 100644
--- a/src/drivers/i2c/tpm/cr50.c
+++ b/src/drivers/i2c/tpm/cr50.c
@@ -49,7 +49,7 @@ __weak int tis_plat_irq_status(void)
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 7aaba82e6b..875fcf218f 100644
--- a/src/drivers/intel/fsp1_1/fsp_relocate.c
+++ b/src/drivers/intel/fsp1_1/fsp_relocate.c
@@ -15,14 +15,14 @@ int fsp_relocate(struct prog *fsp_relocd)
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 3643866c43..b7e81f0915 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -36,7 +36,7 @@ static void save_memory_training_data(bool s3wake, uint32_t fsp_version)
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 @@ static void save_memory_training_data(bool s3wake, uint32_t fsp_version)
*/
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 @@ static void do_fsp_post_memory_init(bool s3wake, uint32_t fsp_version)
} 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 f238397245..9fcc7367bc 100644
--- a/src/drivers/intel/pmc_mux/conn/conn.c
+++ b/src/drivers/intel/pmc_mux/conn/conn.c
@@ -56,7 +56,7 @@ static void conn_write_cbmem_entry(struct device *dev)
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 d5e0cdd61c..e44195c50f 100644
--- a/src/drivers/net/atl1e.c
+++ b/src/drivers/net/atl1e.c
@@ -30,7 +30,7 @@ static u8 get_hex_digit(const u8 c)
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 2299a99b02..51d4fcb0ab 100644
--- a/src/drivers/net/r8168.c
+++ b/src/drivers/net/r8168.c
@@ -76,7 +76,7 @@ static u8 get_hex_digit(const u8 c)
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 @@ static enum cb_err fetch_mac_vpd_key(u8 *macstrbuf, const char *vpd_key)
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 @@ static enum cb_err fetch_mac_vpd_key(u8 *macstrbuf, const char *vpd_key)
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 1474b57057..e8e2345133 100644
--- a/src/drivers/pc80/rtc/option.c
+++ b/src/drivers/pc80/rtc/option.c
@@ -100,7 +100,7 @@ static enum cb_err cmos_get_uint_option(unsigned int *dest, const char *name)
}
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 @@ static enum cb_err cmos_set_uint_option(const char *name, unsigned int *value)
}
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 30b18761ef..9c7baa9d3a 100644
--- a/src/drivers/spi/tpm/tpm.c
+++ b/src/drivers/spi/tpm/tpm.c
@@ -74,7 +74,7 @@ __weak int tis_plat_irq_status(void)
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 @@ static void cr50_set_board_cfg(void)
/* 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 a0fcf11a8e..806e9b20ab 100644
--- a/src/drivers/ti/sn65dsi86bridge/sn65dsi86bridge.c
+++ b/src/drivers/ti/sn65dsi86bridge/sn65dsi86bridge.c
@@ -194,13 +194,13 @@ static cb_err_t sn65dsi86_bridge_aux_request(uint8_t bus,
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 @@ cb_err_t sn65dsi86_bridge_read_edid(uint8_t bus, uint8_t chip, struct edid *out)
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 @@ cb_err_t sn65dsi86_bridge_read_edid(uint8_t bus, uint8_t chip, struct edid *out)
}
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 @@ static void sn65dsi86_bridge_set_dp_clock_range(uint8_t bus, uint8_t chip,
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 @@ static void sn65dsi86_bridge_link_training(uint8_t bus, uint8_t chip)
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 @@ static void sn65dsi86_bridge_link_training(uint8_t bus, uint8_t chip)
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 a099b3be37..396097c9d9 100644
--- a/src/drivers/vpd/vpd.c
+++ b/src/drivers/vpd/vpd.c
@@ -67,7 +67,7 @@ static void init_vpd_rdev(const char *fmap_name, struct region_device *rdev)
/* 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 @@ static void init_vpd_rdev(const char *fmap_name, struct region_device *rdev)
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 @@ static void cbmem_add_cros_vpd(int is_recovery)
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 @@ static void cbmem_add_cros_vpd(int is_recovery)
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 f4ffa5e514..7c606f9099 100644
--- a/src/drivers/wifi/generic/acpi.c
+++ b/src/drivers/wifi/generic/acpi.c
@@ -212,7 +212,7 @@ static void sar_emit_wrds(const struct sar_profile *sar)
* })
*/
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 @@ static void sar_emit_ewrd(const struct sar_profile *sar)
* })
*/
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 @@ static void sar_emit_wgds(struct geo_profile *wgds)
* })
*/
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 @@ static void emit_sar_acpi_structures(const struct device *dev)
/* 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;
}