summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorFrans Hendriks <fhendriks@eltan.com>2021-02-01 11:52:51 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-04-06 07:02:47 +0000
commit68dc369a1cd1a9a58a8c18efb962444af4e31d7f (patch)
treeeeed9ca53141a8aad8b6962f7d65d3ae05559930 /src/device
parentc60fd46420ecc5715e656a28ab1e4e1d234d21b5 (diff)
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>
Diffstat (limited to 'src/device')
-rw-r--r--src/device/i2c_bus.c12
1 files 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;
}