diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arm/armv7/thread.c | 2 | ||||
-rw-r--r-- | src/arch/x86/acpi.c | 2 | ||||
-rw-r--r-- | src/arch/x86/acpigen.c | 2 | ||||
-rw-r--r-- | src/arch/x86/cpu.c | 6 | ||||
-rw-r--r-- | src/arch/x86/exception.c | 4 | ||||
-rw-r--r-- | src/arch/x86/include/arch/io.h | 6 | ||||
-rw-r--r-- | src/arch/x86/mpspec.c | 12 | ||||
-rw-r--r-- | src/arch/x86/pirq_routing.c | 6 | ||||
-rw-r--r-- | src/arch/x86/smbios.c | 8 |
9 files changed, 24 insertions, 24 deletions
diff --git a/src/arch/arm/armv7/thread.c b/src/arch/arm/armv7/thread.c index 6ed7e96c03..53ca2b3054 100644 --- a/src/arch/arm/armv7/thread.c +++ b/src/arch/arm/armv7/thread.c @@ -55,7 +55,7 @@ void arch_prepare_thread(struct thread *t, * hunting for (e.g.) misaligned stacks or other such * weirdness. The -1 is because we already pushed lr. */ - for(i = 0; i < sizeof(struct pushed_regs)/sizeof(u32)-1; i++) + for (i = 0; i < sizeof(struct pushed_regs)/sizeof(u32)-1; i++) stack = push_stack(stack, poison++); t->stack_current = stack; diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index 4ebdcbe04d..50526a5049 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -814,7 +814,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs, void *dsdt) fadt->x_dsdt_l = (unsigned long)dsdt; fadt->x_dsdt_h = 0; - if(IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP)) { + if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP)) { fadt->preferred_pm_profile = PM_MOBILE; } else { fadt->preferred_pm_profile = PM_DESKTOP; diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c index c978fe6f8f..6b9c091e8e 100644 --- a/src/arch/x86/acpigen.c +++ b/src/arch/x86/acpigen.c @@ -298,7 +298,7 @@ void acpigen_emit_namestring(const char *namepath) { /* If we have only \\ or only ^...^. Then we need to put a null name (0x00). */ - if(namepath[0] == '\0') { + if (namepath[0] == '\0') { acpigen_emit_byte(0x00); return; } diff --git a/src/arch/x86/cpu.c b/src/arch/x86/cpu.c index 0fdc11c594..fbd48b0c2b 100644 --- a/src/arch/x86/cpu.c +++ b/src/arch/x86/cpu.c @@ -196,7 +196,7 @@ static void identify_cpu(struct device *cpu) } } cpu->vendor = X86_VENDOR_UNKNOWN; - for(i = 0; i < ARRAY_SIZE(x86_vendors); i++) { + for (i = 0; i < ARRAY_SIZE(x86_vendors); i++) { if (memcmp(vendor_name, x86_vendors[i].name, 12) == 0) { cpu->vendor = x86_vendors[i].vendor; break; @@ -267,12 +267,12 @@ void cpu_initialize(unsigned int index) /* Lookup the cpu's operations */ set_cpu_ops(cpu); - if(!cpu->ops) { + if (!cpu->ops) { /* mask out the stepping and try again */ cpu->device -= c.x86_mask; set_cpu_ops(cpu); cpu->device += c.x86_mask; - if(!cpu->ops) die("Unknown cpu"); + if (!cpu->ops) die("Unknown cpu"); printk(BIOS_DEBUG, "Using generic CPU ops (good)\n"); } diff --git a/src/arch/x86/exception.c b/src/arch/x86/exception.c index cbf0358839..84328be2c1 100644 --- a/src/arch/x86/exception.c +++ b/src/arch/x86/exception.c @@ -513,9 +513,9 @@ void x86_exception(struct eregs *info) * evident from the looking at the dump */ code = (u8*)((uintptr_t)code & ~0x7); int i; - for(i = 0; i < MDUMP_SIZE; i++) + for (i = 0; i < MDUMP_SIZE; i++) { - if( (i & 0x07) == 0 ) + if ( (i & 0x07) == 0 ) printk(BIOS_EMERG, "\n%p:\t", code + i); printk(BIOS_EMERG, "%.2x ", code[i]); } diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h index a71e1a4e44..69922e2a93 100644 --- a/src/arch/x86/include/arch/io.h +++ b/src/arch/x86/include/arch/io.h @@ -267,7 +267,7 @@ void pci_or_config32(pci_devfn_t dev, unsigned where, uint32_t value) #define PCI_DEV_INVALID (0xffffffffU) 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)) { + 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) { @@ -279,7 +279,7 @@ static inline pci_devfn_t pci_io_locate_device(unsigned pci_id, pci_devfn_t dev) 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)) { + 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) { @@ -296,7 +296,7 @@ static inline pci_devfn_t pci_locate_device_on_bus(unsigned pci_id, unsigned bus dev = PCI_DEV(bus, 0, 0); last = PCI_DEV(bus, 31, 7); - for(; dev <=last; dev += PCI_DEV(0,0,1)) { + for (; dev <=last; dev += PCI_DEV(0,0,1)) { unsigned int id; id = pci_read_config32(dev, 0); if (id == pci_id) { diff --git a/src/arch/x86/mpspec.c b/src/arch/x86/mpspec.c index d91adf8821..5f251e31c9 100644 --- a/src/arch/x86/mpspec.c +++ b/src/arch/x86/mpspec.c @@ -63,7 +63,7 @@ static unsigned char smp_compute_checksum(void *v, int len) int i; bytes = v; checksum = 0; - for(i = 0; i < len; i++) { + for (i = 0; i < len; i++) { checksum -= bytes[i]; } return checksum; @@ -170,8 +170,8 @@ void smp_write_processors(struct mp_config_table *mc) cpu_features = result.eax; cpu_feature_flags = result.edx; /* order the output of the cpus to fix a bug in kernel 2.6.11 */ - for(order_id = 0;order_id <256; order_id++) { - for(cpu = all_devices; cpu; cpu = cpu->next) { + for (order_id = 0;order_id <256; order_id++) { + for (cpu = all_devices; cpu; cpu = cpu->next) { unsigned long cpu_flag; if ((cpu->path.type != DEVICE_PATH_APIC) || (cpu->bus->dev->path.type != DEVICE_PATH_CPU_CLUSTER)) @@ -185,7 +185,7 @@ void smp_write_processors(struct mp_config_table *mc) if (boot_apic_id == cpu->path.apic.apic_id) cpu_flag = MPC_CPU_ENABLED | MPC_CPU_BOOTPROCESSOR; - if(cpu->path.apic.apic_id == order_id) { + if (cpu->path.apic.apic_id == order_id) { smp_write_processor(mc, cpu->path.apic.apic_id, apic_version, cpu_flag, cpu_features, cpu_feature_flags @@ -504,7 +504,7 @@ unsigned long __attribute__((weak)) write_smp_table(unsigned long addr) mptable_write_buses(mc, NULL, &isa_bus); - for(dev = all_devices; dev; dev = dev->next) { + for (dev = all_devices; dev; dev = dev->next) { if (dev->path.type != DEVICE_PATH_IOAPIC) continue; @@ -530,7 +530,7 @@ unsigned long __attribute__((weak)) write_smp_table(unsigned long addr) mptable_add_isa_interrupts(mc, isa_bus, isaioapic, 0); } - for(dev = all_devices; dev; dev = dev->next) { + for (dev = all_devices; dev; dev = dev->next) { if (dev->path.type != DEVICE_PATH_PCI || !dev->enabled) continue; diff --git a/src/arch/x86/pirq_routing.c b/src/arch/x86/pirq_routing.c index 4d9311427c..f758dbb572 100644 --- a/src/arch/x86/pirq_routing.c +++ b/src/arch/x86/pirq_routing.c @@ -110,14 +110,14 @@ static u8 pirq_get_next_free_irq(u8* pirq, u16 bitmap) /* And assume we have not yet routed it */ int already_routed = 0; /* Have we already routed it ? */ - for(link = 0; link < CONFIG_MAX_PIRQ_LINKS; link++) { + for (link = 0; link < CONFIG_MAX_PIRQ_LINKS; link++) { if (pirq[link] == irq) { already_routed = 1; break; } } /* If it's not yet routed, use it */ - if(!already_routed) + if (!already_routed) break; /* But if it was already routed, try the next one */ continue; @@ -179,7 +179,7 @@ static void pirq_route_irqs(unsigned long addr) pirq_tbl->slots[i].devfn >> 3, irq_slot); } - for(i = 0; i < CONFIG_MAX_PIRQ_LINKS; i++) + for (i = 0; i < CONFIG_MAX_PIRQ_LINKS; i++) printk(BIOS_DEBUG, "PIRQ%c: %d\n", i + 'A', pirq[i]); pirq_assign_irqs(pirq); diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 9df95e99f8..0c7f3acd95 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -60,7 +60,7 @@ int smbios_add_string(char *start, const char *str) if (*str == '\0') return 0; - for(;;) { + for (;;) { if (!*p) { strcpy(p, str); p += strlen(str); @@ -419,7 +419,7 @@ static int smbios_write_type3(unsigned long *current, int handle) t->bootup_state = SMBIOS_STATE_SAFE; t->power_supply_state = SMBIOS_STATE_SAFE; t->thermal_state = SMBIOS_STATE_SAFE; - if(IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP)) { + if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP)) { t->_type = SMBIOS_ENCLOSURE_NOTEBOOK; } else { t->_type = SMBIOS_ENCLOSURE_DESKTOP; @@ -476,7 +476,7 @@ static int smbios_write_type11(unsigned long *current, int *handle) t->handle = *handle; t->length = len = sizeof *t - 2; - for(dev = all_devices; dev; dev = dev->next) { + for (dev = all_devices; dev; dev = dev->next) { if (dev->ops && dev->ops->get_smbios_strings) dev->ops->get_smbios_strings(dev, t); } @@ -572,7 +572,7 @@ static int smbios_walk_device_tree(struct device *tree, int *handle, unsigned lo struct device *dev; int len = 0; - for(dev = tree; dev; dev = dev->next) { + for (dev = tree; dev; dev = dev->next) { printk(BIOS_INFO, "%s (%s)\n", dev_path(dev), dev_name(dev)); if (dev->ops && dev->ops->get_smbios_data) |