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:
@@ -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, ...) \
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user