[coreboot-gerrit] New patch to review for coreboot: soc/intel/apollolake: Remove unnecessary braces
Lee Leahy (leroy.p.leahy@intel.com)
gerrit at coreboot.org
Thu Mar 9 20:21:02 CET 2017
Lee Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18723
-gerrit
commit c3a83bdbf6880a2abddd77d0d4cca731aed486d1
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date: Thu Mar 9 10:00:30 2017 -0800
soc/intel/apollolake: Remove unnecessary braces
Fix the following warnings detected by checkpatch.pl:
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks
TEST=Build for reef
Change-Id: Ifab09c023faa7da215945f1aedd391f4b2a1a04c
Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
src/soc/intel/apollolake/chip.c | 5 ++---
src/soc/intel/apollolake/lpc.c | 6 ++----
src/soc/intel/apollolake/northbridge.c | 3 +--
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 23f55cf..5bf1b8a 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -140,11 +140,10 @@ static struct device_operations cpu_bus_ops = {
static void enable_dev(device_t dev)
{
/* Set the operations if it is a special bus type */
- if (dev->path.type == DEVICE_PATH_DOMAIN) {
+ if (dev->path.type == DEVICE_PATH_DOMAIN)
dev->ops = &pci_domain_ops;
- } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
+ else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER)
dev->ops = &cpu_bus_ops;
- }
}
/*
diff --git a/src/soc/intel/apollolake/lpc.c b/src/soc/intel/apollolake/lpc.c
index 5455ded..810c4c9 100644
--- a/src/soc/intel/apollolake/lpc.c
+++ b/src/soc/intel/apollolake/lpc.c
@@ -117,9 +117,8 @@ static void loop_resources(struct device *dev)
for (res = dev->resource_list; res; res = res->next) {
- if (res->flags & IORESOURCE_IO) {
+ if (res->flags & IORESOURCE_IO)
lpc_open_pmio_window(res->base, res->size);
- }
if (res->flags & IORESOURCE_MEM) {
/* Check if this is already decoded. */
@@ -143,9 +142,8 @@ static void set_child_resources(struct device *dev)
struct device *child;
for (link = dev->link_list; link; link = link->next) {
- for (child = link->children; child; child = child->sibling) {
+ for (child = link->children; child; child = child->sibling)
loop_resources(child);
- }
}
}
diff --git a/src/soc/intel/apollolake/northbridge.c b/src/soc/intel/apollolake/northbridge.c
index db595f5..e1b54ec 100644
--- a/src/soc/intel/apollolake/northbridge.c
+++ b/src/soc/intel/apollolake/northbridge.c
@@ -81,9 +81,8 @@ static int mc_add_imr_resources(device_t dev, int index)
base = read32(mchbar + imr_offset + MCHBAR_IMR0BASE);
mask = read32(mchbar + imr_offset + MCHBAR_IMR0MASK);
- if (is_imr_enabled(base)) {
+ if (is_imr_enabled(base))
imr_resource(dev, index++, base, mask);
- }
}
return index;
More information about the coreboot-gerrit
mailing list