summaryrefslogtreecommitdiff
path: root/src/cpu/via
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2016-08-23 21:07:28 +0200
committerMartin Roth <martinroth@google.com>2016-08-28 18:47:23 +0200
commitcbe7464c623d148c96974f0ce8724ead0ad5478d (patch)
treee47ead759132c68dbbd5a498184c3ef2c46f8b75 /src/cpu/via
parent3f4aece4e07b15a5a2d191873da04b88c8e87049 (diff)
src/cpu: Add required space before opening parenthesis '('
Change-Id: I7fb9bfcaeec0b9dfd0695d2b2d398fd01091f6bc Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/16286 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Omar Pakker
Diffstat (limited to 'src/cpu/via')
-rw-r--r--src/cpu/via/nano/nano_init.c8
-rw-r--r--src/cpu/via/nano/update_ucode.c18
2 files changed, 13 insertions, 13 deletions
diff --git a/src/cpu/via/nano/nano_init.c b/src/cpu/via/nano/nano_init.c
index ade1ec4967..3a6c1a0b02 100644
--- a/src/cpu/via/nano/nano_init.c
+++ b/src/cpu/via/nano/nano_init.c
@@ -74,7 +74,7 @@ static void nano_set_max_fid_vid(void)
printk(BIOS_INFO, "Voltage ID : %dx (min %dx; max %dx)\n",
cur_vid, min_vid, max_vid);
- if( (cur_fid != max_fid) || (cur_vid != max_vid) ) {
+ if ( (cur_fid != max_fid) || (cur_vid != max_vid) ) {
/* Set highest frequency and VID */
msr.lo = msr.hi;
msr.hi = 0;
@@ -121,7 +121,7 @@ static void nano_power(void)
wrmsr(MSR_IA32_MISC_ENABLE, msr);
u8 stepping = ( cpuid_eax(0x1) ) &0xf;
- if(stepping >= MODEL_NANO_3000_B0) {
+ if (stepping >= MODEL_NANO_3000_B0) {
/* Hello Nano 3000. The Terminator needs a CPU upgrade */
/* Enable C1e, C2e, C3e, and C4e states */
msr = rdmsr(MSR_IA32_MISC_ENABLE);
@@ -143,7 +143,7 @@ static void nano_init(struct device *dev)
get_fms(&c, dev->device);
/* We didn't test this on the Nano 1000/2000 series, so warn the user */
- if(c.x86_mask < MODEL_NANO_3000_B0) {
+ if (c.x86_mask < MODEL_NANO_3000_B0) {
printk(BIOS_EMERG, "WARNING: This CPU has not been tested. "
"Please report any issues encountered.\n");
}
@@ -166,7 +166,7 @@ static void nano_init(struct device *dev)
* CBFS, we'll just get back with 0 updates. User choice FTW. */
unsigned int n_updates = nano_update_ucode();
- if(n_updates != 0){
+ if (n_updates != 0){
nano_power();
} else {
/* Changing the frequency or voltage without first updating the
diff --git a/src/cpu/via/nano/update_ucode.c b/src/cpu/via/nano/update_ucode.c
index 44b074ed31..fc5c9d5847 100644
--- a/src/cpu/via/nano/update_ucode.c
+++ b/src/cpu/via/nano/update_ucode.c
@@ -51,10 +51,10 @@ static void nano_print_ucode_info(const nano_ucode_header *ucode)
static ucode_validity nano_ucode_is_valid(const nano_ucode_header *ucode)
{
/* We must have a valid signature */
- if(ucode->signature != NANO_UCODE_SIGNATURE)
+ if (ucode->signature != NANO_UCODE_SIGNATURE)
return NANO_UCODE_SIGNATURE_ERROR;
/* The size of the head must be exactly 12 double words */
- if( (ucode->total_size - ucode->payload_size) != NANO_UCODE_HEADER_SIZE)
+ if ( (ucode->total_size - ucode->payload_size) != NANO_UCODE_HEADER_SIZE)
return NANO_UCODE_WRONG_SIZE;
/* How about a checksum ? Checksum must be 0
@@ -62,10 +62,10 @@ static ucode_validity nano_ucode_is_valid(const nano_ucode_header *ucode)
int i;
u32 check = 0;
u32 *raw = (void*) ucode;
- for(i = 0 ; i < ((ucode->total_size) >> 2); i++) {
+ for (i = 0 ; i < ((ucode->total_size) >> 2); i++) {
check += raw[i];
}
- if(check != 0)
+ if (check != 0)
return NANO_UCODE_CHECKSUM_FAIL;
/* Made it here huh? Then it looks valid to us.
* If there's anything else wrong, the CPU will reject the update */
@@ -110,7 +110,7 @@ unsigned int nano_update_ucode(void)
ucode_data = cbfs_boot_map_with_leak("cpu_microcode_blob.bin",
CBFS_TYPE_MICROCODE, &ucode_len);
/* Oops, did you forget to include the microcode ? */
- if(ucode_data == NULL) {
+ if (ucode_data == NULL) {
printk(BIOS_ALERT, "WARNING: No microcode file found in CBFS. "
"Aborting microcode updates\n");
return 0;
@@ -119,11 +119,11 @@ unsigned int nano_update_ucode(void)
/* We might do a lot of loops searching for the microcode updates, but
* keep in mind, nano_ucode_is_valid searches for the signature before
* doing anything else. */
- for( i = 0; i < (ucode_len >> 2); /* don't increment i here */ )
+ for ( i = 0; i < (ucode_len >> 2); /* don't increment i here */ )
{
ucode_update_status stat;
const nano_ucode_header * ucode = (void *)(&ucode_data[i]);
- if(nano_ucode_is_valid(ucode) != NANO_UCODE_VALID) {
+ if (nano_ucode_is_valid(ucode) != NANO_UCODE_VALID) {
i++;
continue;
}
@@ -132,14 +132,14 @@ unsigned int nano_update_ucode(void)
* microcode */
i += (ucode->total_size >> 2);
/* Is the microcode compatible with our CPU? */
- if(ucode->applicable_fms != fms) continue;
+ if (ucode->applicable_fms != fms) continue;
/* For our most curious users */
nano_print_ucode_info(ucode);
/* The meat of the pie */
stat = nano_apply_ucode(ucode);
/* The user might want to know how the update went */
nano_print_ucode_status(stat);
- if(stat == UCODE_UPDATE_SUCCESS) n_updates++;
+ if (stat == UCODE_UPDATE_SUCCESS) n_updates++;
}
return n_updates;