summaryrefslogtreecommitdiff
path: root/src/arch/x86/acpi.c
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-16 11:24:09 -0700
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-17 03:12:39 +0100
commit9c7c6f7213decfc0d0fee4bbc911a291ee93bcdb (patch)
treed9e23ea1f89f75c6e178734bbe375860515bf3e2 /src/arch/x86/acpi.c
parentd94cff6ab26d482554309041a9317cc3bf5e4b02 (diff)
arch/x86: Fix issues with braces detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl: ERROR: open brace '{' following function declarations go on the next line ERROR: that open brace { should be on the previous line ERROR: else should follow close brace '}' WARNING: braces {} are not necessary for any arm of this statement WARNING: braces {} are not necessary for single statement blocks TEST=Build and run on Galileo Gen2 Change-Id: I13d1967757e106c8300a15baed25d920c52a1a95 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18861 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/arch/x86/acpi.c')
-rw-r--r--src/arch/x86/acpi.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index 703bfa1e9b..4109ec4fae 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -287,9 +287,8 @@ static void acpi_create_tcpa(acpi_tcpa_t *tcpa)
memset((void *)tcpa, 0, sizeof(acpi_tcpa_t));
lasa = get_tcpa_log(&tcpa_log_len);
- if (!lasa) {
+ if (!lasa)
return;
- }
/* Fill out header fields. */
memcpy(header->signature, "TCPA", 4);
@@ -354,9 +353,8 @@ void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id)
{
struct device *dev;
for (dev = all_devices; dev; dev = dev->next)
- if (dev->ops && dev->ops->acpi_fill_ssdt_generator) {
+ if (dev->ops && dev->ops->acpi_fill_ssdt_generator)
dev->ops->acpi_fill_ssdt_generator(dev);
- }
current = (unsigned long) acpigen_get_current();
}
@@ -840,11 +838,10 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs, void *dsdt)
fadt->x_dsdt_l = (unsigned long)dsdt;
fadt->x_dsdt_h = 0;
- if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP)) {
+ if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP))
fadt->preferred_pm_profile = PM_MOBILE;
- } else {
+ else
fadt->preferred_pm_profile = PM_DESKTOP;
- }
acpi_fill_fadt(fadt);
@@ -953,9 +950,8 @@ unsigned long write_acpi_tables(unsigned long start)
acpigen_set_current((char *) current);
for (dev = all_devices; dev; dev = dev->next)
- if (dev->ops && dev->ops->acpi_inject_dsdt_generator) {
+ if (dev->ops && dev->ops->acpi_inject_dsdt_generator)
dev->ops->acpi_inject_dsdt_generator(dev);
- }
current = (unsigned long) acpigen_get_current();
memcpy((char *)current,
(char *)dsdt_file + sizeof(acpi_header_t),