aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86/pae
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-15 14:49:35 -0700
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-16 04:11:45 +0100
commita15d8af140528df440617c074136d32be28e4976 (patch)
treefbf02e4957b11bb0e14bc53b1706d9346f668c88 /src/cpu/x86/pae
parenta07d0ddc44a3460e8ce8b84d34335d230ab98906 (diff)
cpu/x86: Remove braces and else if unnecessary
Fix the following warnings detected by checkpatch.pl WARNING: braces {} are not necessary for single statement blocks WARNING: braces {} are not necessary for any arm of this statement WARNING: else is not generally useful after a break or return TEST=Build and run on Galileo Gen2 Change-Id: I2d6b22c66d52f5f2d24b15270ad4b52894adebc2 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18842 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/cpu/x86/pae')
-rw-r--r--src/cpu/x86/pae/pgtbl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cpu/x86/pae/pgtbl.c b/src/cpu/x86/pae/pgtbl.c
index 303b53fc78..c2fa83d935 100644
--- a/src/cpu/x86/pae/pgtbl.c
+++ b/src/cpu/x86/pae/pgtbl.c
@@ -72,9 +72,8 @@ void *map_2M_page(unsigned long page)
void *result;
int i;
index = cpu_index();
- if (index >= CONFIG_MAX_CPUS) {
+ if (index >= CONFIG_MAX_CPUS)
return MAPPING_ERROR;
- }
window = page >> 10;
if (window != mapped_window[index]) {
paging_off();
@@ -102,10 +101,9 @@ void *map_2M_page(unsigned long page)
}
mapped_window[index] = window;
}
- if (window == 0) {
+ if (window == 0)
result = (void *)(page << 21);
- } else {
+ else
result = (void *)(0x80000000 | ((page & 0x3ff) << 21));
- }
return result;
}