aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/braswell/tsc_freq.c
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-16 17:49:42 -0700
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-17 02:36:36 +0100
commitd94cff6ab26d482554309041a9317cc3bf5e4b02 (patch)
treea09902883736f6eca89e96e53642ce944ff0401b /src/soc/intel/braswell/tsc_freq.c
parent1072e7dcc30895f850143450504b78a4135978b6 (diff)
soc/intel/braswell: Fix most of the issues detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl: ERROR: that open brace { should be on the previous line ERROR: return is not a function, parentheses are not required WARNING: braces {} are not necessary for any arm of this statement WARNING: line over 80 characters WARNING: braces {} are not necessary for single statement blocks WARNING: Avoid unnecessary line continuations WARNING: break is not useful after a goto or return WARNING: else is not generally useful after a break or return False positives are generated by checkpatch for the following test: ERROR: Macros with complex values should be enclosed in parentheses TEST=Build for cyan Change-Id: I19048895145b138a63100b29f829ff446ff71b58 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18871 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/intel/braswell/tsc_freq.c')
-rw-r--r--src/soc/intel/braswell/tsc_freq.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/soc/intel/braswell/tsc_freq.c b/src/soc/intel/braswell/tsc_freq.c
index 929b6b59bc..b05a007c66 100644
--- a/src/soc/intel/braswell/tsc_freq.c
+++ b/src/soc/intel/braswell/tsc_freq.c
@@ -41,10 +41,9 @@ static const unsigned int cpu_bus_clk_freq_table[] = {
unsigned int cpu_bus_freq_khz(void)
{
msr_t clk_info = rdmsr(MSR_BSEL_CR_OVERCLOCK_CONTROL);
- if ((clk_info.lo & 0xF) < (sizeof(cpu_bus_clk_freq_table)/sizeof(unsigned int)))
- {
- return(cpu_bus_clk_freq_table[clk_info.lo & 0xF]);
- }
+ if ((clk_info.lo & 0xF)
+ < (sizeof(cpu_bus_clk_freq_table) / sizeof(unsigned int)))
+ return cpu_bus_clk_freq_table[clk_info.lo & 0xF];
return 0;
}