console: Add format-checking __printf() to die()
Code changes are necessary because `-Wformat` warns about empty format strings by default. Change-Id: Ic8021b70f4cd4875b06f196f88b84940c9a79fe0 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75147 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
@@ -405,11 +405,8 @@ struct resource *find_resource(const struct device *dev, unsigned int index)
|
||||
|
||||
/* See if there is a resource with the appropriate index. */
|
||||
resource = probe_resource(dev, index);
|
||||
if (!resource) {
|
||||
printk(BIOS_EMERG, "%s missing resource: %02x\n",
|
||||
dev_path(dev), index);
|
||||
die("");
|
||||
}
|
||||
if (!resource)
|
||||
die("%s missing resource: %02x\n", dev_path(dev), index);
|
||||
return resource;
|
||||
}
|
||||
|
||||
|
@@ -8,11 +8,8 @@
|
||||
struct bus *get_pbus_smbus(struct device *dev)
|
||||
{
|
||||
struct bus *const pbus = i2c_link(dev);
|
||||
if (!pbus->dev->ops->ops_smbus_bus) {
|
||||
printk(BIOS_ALERT, "%s Cannot find SMBus bus operations",
|
||||
dev_path(dev));
|
||||
die("");
|
||||
}
|
||||
if (!pbus->dev->ops->ops_smbus_bus)
|
||||
die("%s Cannot find SMBus bus operations", dev_path(dev));
|
||||
return pbus;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user