soc/intel/common: Fix spacing issues
Fix the following errors detected by checkpatch.pl:
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxW)
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required before the open parenthesis '('
ERROR: switch and case should be at the same indent
ERROR: "foo ** bar" should be "foo **bar"
TEST=Build and run on Galileo Gen2
Change-Id: I52ba2a3c1e0fffad7145eecd878aba8dc450ac0b
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18755
Tested-by: build bot (Jenkins)
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
diff --git a/src/soc/intel/common/acpi/acpi.c b/src/soc/intel/common/acpi/acpi.c
index 63877ee..218430f 100644
--- a/src/soc/intel/common/acpi/acpi.c
+++ b/src/soc/intel/common/acpi/acpi.c
@@ -273,8 +273,8 @@
printk(BIOS_DEBUG, "Found %d CPU(s) with %d core(s) each.\n",
numcpus, cores_per_package);
- for (cpu_id=0; cpu_id < numcpus; cpu_id++) {
- for (core_id=0; core_id < cores_per_package; core_id++) {
+ for (cpu_id = 0; cpu_id < numcpus; cpu_id++) {
+ for (core_id = 0; core_id < cores_per_package; core_id++) {
if (core_id > 0) {
pcontrol_blk = 0;
plen = 0;
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c
index 77cedb1..3808bd6 100644
--- a/src/soc/intel/common/block/cse/cse.c
+++ b/src/soc/intel/common/block/cse/cse.c
@@ -323,7 +323,7 @@
hdr |= client_addr << MEI_HDR_CSE_ADDR_START;
hdr |= host_addr << MEI_HDR_HOST_ADDR_START;
hdr |= (MIN(max_length, remaining) == remaining) ?
- MEI_HDR_IS_COMPLETE: 0;
+ MEI_HDR_IS_COMPLETE : 0;
sent = send_one_message(hdr, p);
p += sent;
remaining -= sent;
diff --git a/src/soc/intel/common/hda_verb.c b/src/soc/intel/common/hda_verb.c
index 6e27e11..58732e5 100644
--- a/src/soc/intel/common/hda_verb.c
+++ b/src/soc/intel/common/hda_verb.c
@@ -172,9 +172,9 @@
*/
static u32 hda_find_verb(u32 verb_table_bytes,
const u32 *verb_table_data,
- u32 viddid, const u32 ** verb)
+ u32 viddid, const u32 **verb)
{
- int idx=0;
+ int idx = 0;
while (idx < (verb_table_bytes / sizeof(u32))) {
u32 verb_size = 4 * verb_table_data[idx+2]; // in u32
diff --git a/src/soc/intel/common/lpss_i2c.h b/src/soc/intel/common/lpss_i2c.h
index 9566973..19cf6ce 100644
--- a/src/soc/intel/common/lpss_i2c.h
+++ b/src/soc/intel/common/lpss_i2c.h
@@ -65,12 +65,12 @@
struct lpss_i2c_speed_config speed_config[LPSS_I2C_SPEED_CONFIG_COUNT];
};
-#define LPSS_I2C_SPEED_CONFIG(speedval,lcnt,hcnt,hold) \
- { \
- .speed = I2C_SPEED_ ## speedval, \
- .scl_lcnt = (lcnt), \
- .scl_hcnt = (hcnt), \
- .sda_hold = (hold), \
+#define LPSS_I2C_SPEED_CONFIG(speedval, lcnt, hcnt, hold) \
+ { \
+ .speed = I2C_SPEED_ ## speedval, \
+ .scl_lcnt = (lcnt), \
+ .scl_hcnt = (hcnt), \
+ .sda_hold = (hold), \
}
/*
diff --git a/src/soc/intel/common/smihandler.c b/src/soc/intel/common/smihandler.c
index 95e7c76..da91c45 100644
--- a/src/soc/intel/common/smihandler.c
+++ b/src/soc/intel/common/smihandler.c
@@ -388,21 +388,21 @@
uintptr_t value = 0;
em64t100_smm_state_save_area_t *smm_state = state;
- switch(reg) {
- case RAX:
- value = smm_state->rax;
- break;
- case RBX:
- value = smm_state->rbx;
- break;
- case RCX:
- value = smm_state->rcx;
- break;
- case RDX:
- value = smm_state->rdx;
- break;
- default:
- break;
+ switch (reg) {
+ case RAX:
+ value = smm_state->rax;
+ break;
+ case RBX:
+ value = smm_state->rbx;
+ break;
+ case RCX:
+ value = smm_state->rcx;
+ break;
+ case RDX:
+ value = smm_state->rdx;
+ break;
+ default:
+ break;
}
return value;
}
@@ -410,7 +410,7 @@
static void em64t100_smm_save_state_set_reg(void *state, enum smm_reg reg, uint64_t val)
{
em64t100_smm_state_save_area_t *smm_state = state;
- switch(reg) {
+ switch (reg) {
case RAX:
smm_state->rax = val;
break;
@@ -439,21 +439,21 @@
uintptr_t value = 0;
em64t101_smm_state_save_area_t *smm_state = state;
- switch(reg) {
- case RAX:
- value = smm_state->rax;
- break;
- case RBX:
- value = smm_state->rbx;
- break;
- case RCX:
- value = smm_state->rcx;
- break;
- case RDX:
- value = smm_state->rdx;
- break;
- default:
- break;
+ switch (reg) {
+ case RAX:
+ value = smm_state->rax;
+ break;
+ case RBX:
+ value = smm_state->rbx;
+ break;
+ case RCX:
+ value = smm_state->rcx;
+ break;
+ case RDX:
+ value = smm_state->rdx;
+ break;
+ default:
+ break;
}
return value;
}
@@ -461,7 +461,7 @@
static void em64t101_smm_save_state_set_reg(void *state, enum smm_reg reg, uint64_t val)
{
em64t101_smm_state_save_area_t *smm_state = state;
- switch(reg) {
+ switch (reg) {
case RAX:
smm_state->rax = val;
break;