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>
This commit is contained in:
Lee Leahy 2017-03-16 11:24:09 -07:00
commit 9c7c6f7213
12 changed files with 66 additions and 102 deletions

View file

@ -54,9 +54,8 @@ static void sanitize_cmos(void)
if (cmos_default) {
int i;
cmos_disable_rtc();
for (i = 14; i < 128; i++) {
for (i = 14; i < 128; i++)
cmos_write_inner(cmos_default[i], i);
}
cmos_enable_rtc();
}
}

View file

@ -306,9 +306,8 @@ static inline pci_devfn_t pci_io_locate_device(unsigned pci_id, pci_devfn_t dev)
for (; dev <= PCI_DEV(255, 31, 7); dev += PCI_DEV(0,0,1)) {
unsigned int id;
id = pci_io_read_config32(dev, 0);
if (id == pci_id) {
if (id == pci_id)
return dev;
}
}
return PCI_DEV_INVALID;
}
@ -318,9 +317,8 @@ static inline pci_devfn_t pci_locate_device(unsigned pci_id, pci_devfn_t dev)
for (; dev <= PCI_DEV(255, 31, 7); dev += PCI_DEV(0,0,1)) {
unsigned int id;
id = pci_read_config32(dev, 0);
if (id == pci_id) {
if (id == pci_id)
return dev;
}
}
return PCI_DEV_INVALID;
}
@ -335,9 +333,8 @@ static inline pci_devfn_t pci_locate_device_on_bus(unsigned pci_id, unsigned bus
for (; dev <=last; dev += PCI_DEV(0,0,1)) {
unsigned int id;
id = pci_read_config32(dev, 0);
if (id == pci_id) {
if (id == pci_id)
return dev;
}
}
return PCI_DEV_INVALID;
}

View file

@ -39,8 +39,7 @@
#define SMP_FLOATING_TABLE_LEN sizeof(struct intel_mp_floating)
struct intel_mp_floating
{
struct intel_mp_floating {
char mpf_signature[4]; /* "_MP_" */
u32 mpf_physptr; /* Configuration table address */
u8 mpf_length; /* Our length (paragraphs) */
@ -55,8 +54,7 @@ struct intel_mp_floating
u8 mpf_feature5; /* Unused (0) */
} __attribute__((packed));
struct mp_config_table
{
struct mp_config_table {
char mpc_signature[4];
#define MPC_SIGNATURE "PCMP"
u16 mpc_length; /* Size of table */
@ -81,8 +79,7 @@ struct mp_config_table
#define MP_INTSRC 3
#define MP_LINTSRC 4
struct mpc_config_processor
{
struct mpc_config_processor {
u8 mpc_type;
u8 mpc_apicid; /* Local APIC number */
u8 mpc_apicver; /* Its versions */
@ -97,8 +94,7 @@ struct mpc_config_processor
u32 mpc_reserved[2];
} __attribute__((packed));
struct mpc_config_bus
{
struct mpc_config_bus {
u8 mpc_type;
u8 mpc_busid;
u8 mpc_bustype[6];
@ -112,8 +108,7 @@ struct mpc_config_bus
#define BUSTYPE_PCI "PCI"
#define BUSTYPE_PCMCIA "PCMCIA"
struct mpc_config_ioapic
{
struct mpc_config_ioapic {
u8 mpc_type;
u8 mpc_apicid;
u8 mpc_apicver;
@ -122,8 +117,7 @@ struct mpc_config_ioapic
void *mpc_apicaddr;
} __attribute__((packed));
struct mpc_config_intsrc
{
struct mpc_config_intsrc {
u8 mpc_type;
u8 mpc_irqtype;
u16 mpc_irqflag;
@ -150,8 +144,7 @@ enum mp_irq_source_types {
#define MP_IRQ_TRIGGER_MASK 0xc
struct mpc_config_lintsrc
{
struct mpc_config_lintsrc {
u8 mpc_type;
u8 mpc_irqtype;
u16 mpc_irqflag;