summaryrefslogtreecommitdiff
path: root/src/arch/x86/acpigen.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/acpigen.c
parentd94cff6ab26d482554309041a9317cc3bf5e4b02 (diff)
downloadcoreboot-9c7c6f7213decfc0d0fee4bbc911a291ee93bcdb.tar.xz
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/acpigen.c')
-rw-r--r--src/arch/x86/acpigen.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c
index d3ec05fe3d..7e4775cef3 100644
--- a/src/arch/x86/acpigen.c
+++ b/src/arch/x86/acpigen.c
@@ -204,9 +204,8 @@ void acpigen_write_name_string(const char *name, const char *string)
void acpigen_emit_stream(const char *data, int size)
{
int i;
- for (i = 0; i < size; i++) {
+ for (i = 0; i < size; i++)
acpigen_emit_byte(data[i]);
- }
}
void acpigen_emit_string(const char *string)
@@ -238,7 +237,8 @@ void acpigen_write_coreboot_hid(enum coreboot_acpi_ids id)
* Check sections 5.3, 18.2.2 and 18.4 of ACPI spec 3.0 for details.
*/
-static void acpigen_emit_simple_namestring(const char *name) {
+static void acpigen_emit_simple_namestring(const char *name)
+{
int i;
char ud[] = "____";
for (i = 0; i < 4; i++) {
@@ -251,13 +251,15 @@ static void acpigen_emit_simple_namestring(const char *name) {
}
}
-static void acpigen_emit_double_namestring(const char *name, int dotpos) {
+static void acpigen_emit_double_namestring(const char *name, int dotpos)
+{
acpigen_emit_byte(DUAL_NAME_PREFIX);
acpigen_emit_simple_namestring(name);
acpigen_emit_simple_namestring(&name[dotpos + 1]);
}
-static void acpigen_emit_multi_namestring(const char *name) {
+static void acpigen_emit_multi_namestring(const char *name)
+{
int count = 0;
unsigned char *pathlen;
acpigen_emit_byte(MULTI_NAME_PREFIX);
@@ -279,7 +281,8 @@ static void acpigen_emit_multi_namestring(const char *name) {
}
-void acpigen_emit_namestring(const char *namepath) {
+void acpigen_emit_namestring(const char *namepath)
+{
int dotcount = 0, i;
int dotpos = 0;
@@ -311,13 +314,12 @@ void acpigen_emit_namestring(const char *namepath) {
i++;
}
- if (dotcount == 0) {
+ if (dotcount == 0)
acpigen_emit_simple_namestring(namepath);
- } else if (dotcount == 1) {
+ else if (dotcount == 1)
acpigen_emit_double_namestring(namepath, dotpos);
- } else {
+ else
acpigen_emit_multi_namestring(namepath);
- }
}
void acpigen_write_name(const char *name)