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/device/pnp_device.c b/src/device/pnp_device.c
index 88072b9..85daec7 100644
--- a/src/device/pnp_device.c
+++ b/src/device/pnp_device.c
@@ -126,12 +126,12 @@
if (resource->flags & IORESOURCE_IRQ &&
(resource->index != PNP_IDX_IRQ0) &&
(resource->index != PNP_IDX_IRQ1))
- printk(BIOS_WARNING, "WARNING: %s %02lx %s size: "
+ printk(BIOS_WARNING, "%s %02lx %s size: "
"0x%010llx not assigned in devicetree\n", dev_path(dev),
resource->index, resource_type(resource),
resource->size);
else
- printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx "
+ printk(BIOS_ERR, "%s %02lx %s size: 0x%010llx "
"not assigned in devicetree\n", dev_path(dev), resource->index,
resource_type(resource), resource->size);
return;
@@ -145,7 +145,7 @@
} else if (resource->flags & IORESOURCE_IRQ) {
pnp_set_irq(dev, resource->index, resource->base);
} else {
- printk(BIOS_ERR, "ERROR: %s %02lx unknown resource type\n",
+ printk(BIOS_ERR, "%s %02lx unknown resource type\n",
dev_path(dev), resource->index);
return;
}
@@ -213,7 +213,7 @@
/* If none of the mask bits is set, the resource would occupy the whole
IO space leading to IO resource conflicts with the other devices */
if (!mask) {
- printk(BIOS_ERR, "ERROR: device %s index %d has no mask.\n",
+ printk(BIOS_ERR, "device %s index %d has no mask.\n",
dev_path(dev), index);
return;
}
@@ -241,8 +241,7 @@
If there is any zero in between the block of ones, it is ignored
in the calculation of the resource size and limit. */
if (mask != (resource->limit ^ (resource->size - 1)))
- printk(BIOS_WARNING,
- "WARNING: mask of device %s index %d is wrong.\n",
+ printk(BIOS_WARNING, "mask of device %s index %d is wrong.\n",
dev_path(dev), index);
}