From 68dc369a1cd1a9a58a8c18efb962444af4e31d7f Mon Sep 17 00:00:00 2001 From: Frans Hendriks Date: Mon, 1 Feb 2021 11:52:51 +0100 Subject: device/i2c_bus.c: Correct code style device: Correct code style Revise the following aspects to follow coreboot's coding style: - Drop braces for single-statement condition. - Remove unnecessary newlines. BUG = N/A TEST = Build Compulab Intense-PC with secure oprom enabled Change-Id: I78ce97b0ce1587119a71893c867c2dd062552a31 Signed-off-by: Frans Hendriks Reviewed-on: https://review.coreboot.org/c/coreboot/+/50190 Tested-by: build bot (Jenkins) Reviewed-by: Wim Vervoorn --- src/device/i2c_bus.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/device/i2c_bus.c b/src/device/i2c_bus.c index 93ec854cf8..597a530d88 100644 --- a/src/device/i2c_bus.c +++ b/src/device/i2c_bus.c @@ -25,10 +25,8 @@ struct bus *i2c_link(struct device *const dev) link = NULL; } - if (!link) { - printk(BIOS_ALERT, "%s Cannot find I2C or SMBus bus operations", - dev_path(dev)); - } + if (!link) + printk(BIOS_ALERT, "%s Cannot find I2C or SMBus bus operations", dev_path(dev)); return link; } @@ -79,8 +77,7 @@ int i2c_dev_writeb(struct device *const dev, uint8_t val) return busdev->ops->ops_smbus_bus->send_byte(dev, val); } - printk(BIOS_ERR, "%s Missing ops_smbus_bus->send_byte", - dev_path(busdev)); + printk(BIOS_ERR, "%s Missing ops_smbus_bus->send_byte", dev_path(busdev)); return -1; } @@ -140,8 +137,7 @@ int i2c_dev_writeb_at(struct device *const dev, const uint8_t off, const uint8_t return busdev->ops->ops_smbus_bus->write_byte(dev, off, val); } - printk(BIOS_ERR, "%s Missing ops_smbus_bus->write_byte", - dev_path(busdev)); + printk(BIOS_ERR, "%s Missing ops_smbus_bus->write_byte", dev_path(busdev)); return -1; } -- cgit v1.2.3