diff options
-rw-r--r-- | src/device/device_util.c | 7 | ||||
-rw-r--r-- | src/device/smbus_ops.c | 7 | ||||
-rw-r--r-- | src/include/console/console.h | 2 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/chip_common.c | 3 |
4 files changed, 6 insertions, 13 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c index c5e03f2079..b37d1d9bfc 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -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; } diff --git a/src/device/smbus_ops.c b/src/device/smbus_ops.c index 12aaf998c9..d08965c7e0 100644 --- a/src/device/smbus_ops.c +++ b/src/device/smbus_ops.c @@ -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; } diff --git a/src/include/console/console.h b/src/include/console/console.h index c69efcde40..fb257ba16c 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -18,7 +18,7 @@ void mainboard_post(u8 value); void arch_post_code(u8 value); void soc_post_code(uint8_t value); -void __noreturn die(const char *fmt, ...); +void __noreturn __printf(1, 2) die(const char *fmt, ...); #define die_with_post_code(value, fmt, ...) \ do { post_code(value); die(fmt, ##__VA_ARGS__); } while (0) diff --git a/src/soc/intel/xeon_sp/chip_common.c b/src/soc/intel/xeon_sp/chip_common.c index f6805b2032..a9b1260646 100644 --- a/src/soc/intel/xeon_sp/chip_common.c +++ b/src/soc/intel/xeon_sp/chip_common.c @@ -40,8 +40,7 @@ static RES_TYPE get_res_type(uint64_t flags) /* both 64-bit and 32-bit use below 4GB address space */ return RES_TYPE_NONPREF_MEM; } - printk(BIOS_ERR, "Invalid resource type 0x%llx\n", flags); - die(""); + die("Invalid resource type 0x%llx\n", flags); } static bool need_assignment(uint64_t flags) |