From e9665959edeba6ae2d5364c4f7339704b6b6fd42 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Fri, 21 Jan 2022 17:06:20 -0800 Subject: 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 Change-Id: I3d0573acb23d2df53db6813cb1a5fc31b5357db8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61309 Tested-by: build bot (Jenkins) Reviewed-by: HAOUAS Elyes Reviewed-by: Lance Zhao Reviewed-by: Jason Glenesk --- src/lib/fit.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/lib/fit.c') diff --git a/src/lib/fit.c b/src/lib/fit.c index 23ee52fd5b..08fd0455b3 100644 --- a/src/lib/fit.c +++ b/src/lib/fit.c @@ -78,7 +78,7 @@ static struct fit_image_node *find_image(const char *name) if (!strcmp(image->name, name)) return image; } - printk(BIOS_ERR, "ERROR: Cannot find image node %s!\n", name); + printk(BIOS_ERR, "Cannot find image node %s!\n", name); return NULL; } @@ -413,8 +413,7 @@ static int fit_update_compat(struct fit_config_node *config) uint32_t fdt_offset = be32_to_cpu(fdt_header->structure_offset); if (config->fdt->compression != CBFS_COMPRESS_NONE) { - printk(BIOS_ERR, - "ERROR: config %s has a compressed FDT without " + printk(BIOS_ERR, "config %s has a compressed FDT without " "external compatible property, skipping.\n", config->name); return -1; @@ -422,15 +421,13 @@ static int fit_update_compat(struct fit_config_node *config) /* FDT overlays are not supported in legacy FIT images. */ if (config->overlays.next) { - printk(BIOS_ERR, - "ERROR: config %s has overlay but no compat!\n", + printk(BIOS_ERR, "config %s has overlay but no compat!\n", config->name); return -1; } if (fdt_find_compat(fdt_blob, fdt_offset, &config->compat)) { - printk(BIOS_ERR, - "ERROR: Can't find compat string in FDT %s " + printk(BIOS_ERR, "Can't find compat string in FDT %s " "for config %s, skipping.\n", config->fdt->name, config->name); return -1; @@ -467,7 +464,7 @@ struct fit_config_node *fit_load(void *fit) struct device_tree *tree = fdt_unflatten(fit); if (!tree) { - printk(BIOS_ERR, "ERROR: Failed to unflatten FIT image!\n"); + printk(BIOS_ERR, "Failed to unflatten FIT image!\n"); return NULL; } @@ -494,21 +491,19 @@ struct fit_config_node *fit_load(void *fit) /* Process and list the configs. */ list_for_each(config, config_nodes, list_node) { if (!config->kernel) { - printk(BIOS_ERR, - "ERROR: config %s has no kernel, skipping.\n", + printk(BIOS_ERR, "config %s has no kernel, skipping.\n", config->name); continue; } if (!config->fdt) { - printk(BIOS_ERR, - "ERROR: config %s has no FDT, skipping.\n", + printk(BIOS_ERR, "config %s has no FDT, skipping.\n", config->name); continue; } if (config->ramdisk && config->ramdisk->compression < 0) { - printk(BIOS_WARNING, "WARN: Ramdisk is compressed with " + printk(BIOS_WARNING, "Ramdisk is compressed with " "an unsupported algorithm, discarding config %s." "\n", config->name); continue; -- cgit v1.2.3