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 <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50190
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
This commit is contained in:
Frans Hendriks 2021-02-01 11:52:51 +01:00 committed by Patrick Georgi
parent c60fd46420
commit 68dc369a1c
1 changed files with 4 additions and 8 deletions

View File

@ -25,10 +25,8 @@ struct bus *i2c_link(struct device *const dev)
link = NULL; link = NULL;
} }
if (!link) { if (!link)
printk(BIOS_ALERT, "%s Cannot find I2C or SMBus bus operations", printk(BIOS_ALERT, "%s Cannot find I2C or SMBus bus operations", dev_path(dev));
dev_path(dev));
}
return link; 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); return busdev->ops->ops_smbus_bus->send_byte(dev, val);
} }
printk(BIOS_ERR, "%s Missing ops_smbus_bus->send_byte", printk(BIOS_ERR, "%s Missing ops_smbus_bus->send_byte", dev_path(busdev));
dev_path(busdev));
return -1; 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); return busdev->ops->ops_smbus_bus->write_byte(dev, off, val);
} }
printk(BIOS_ERR, "%s Missing ops_smbus_bus->write_byte", printk(BIOS_ERR, "%s Missing ops_smbus_bus->write_byte", dev_path(busdev));
dev_path(busdev));
return -1; return -1;
} }