[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/17] hw/mips/gt64xxx_pci: Fix 'braces' coding style
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PULL 03/17] hw/mips/gt64xxx_pci: Fix 'braces' coding style issues |
Date: |
Wed, 26 Jun 2019 13:45:36 +0200 |
From: Philippe Mathieu-Daudé <address@hidden>
Since we'll move this code around, fix its style first:
ERROR: braces {} are necessary for all arms of this statement
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Aleksandar Markovic <address@hidden>
Message-Id: <address@hidden>
---
hw/mips/gt64xxx_pci.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
index bbd719f..cfd4979 100644
--- a/hw/mips/gt64xxx_pci.c
+++ b/hw/mips/gt64xxx_pci.c
@@ -257,19 +257,25 @@ static void check_reserved_space(hwaddr *start, hwaddr
*length)
hwaddr begin = *start;
hwaddr end = *start + *length;
- if (end >= 0x1e000000LL && end < 0x1f100000LL)
+ if (end >= 0x1e000000LL && end < 0x1f100000LL) {
end = 0x1e000000LL;
- if (begin >= 0x1e000000LL && begin < 0x1f100000LL)
+ }
+ if (begin >= 0x1e000000LL && begin < 0x1f100000LL) {
begin = 0x1f100000LL;
- if (end >= 0x1fc00000LL && end < 0x1fd00000LL)
+ }
+ if (end >= 0x1fc00000LL && end < 0x1fd00000LL) {
end = 0x1fc00000LL;
- if (begin >= 0x1fc00000LL && begin < 0x1fd00000LL)
+ }
+ if (begin >= 0x1fc00000LL && begin < 0x1fd00000LL) {
begin = 0x1fd00000LL;
+ }
/* XXX: This is broken when a reserved range splits the requested range */
- if (end >= 0x1f100000LL && begin < 0x1e000000LL)
+ if (end >= 0x1f100000LL && begin < 0x1e000000LL) {
end = 0x1e000000LL;
- if (end >= 0x1fd00000LL && begin < 0x1fc00000LL)
+ }
+ if (end >= 0x1fd00000LL && begin < 0x1fc00000LL) {
end = 0x1fc00000LL;
+ }
*start = begin;
*length = end - begin;
@@ -385,8 +391,9 @@ static void gt64120_writel (void *opaque, hwaddr addr,
PCIHostState *phb = PCI_HOST_BRIDGE(s);
uint32_t saddr;
- if (!(s->regs[GT_CPU] & 0x00001000))
+ if (!(s->regs[GT_CPU] & 0x00001000)) {
val = bswap32(val);
+ }
saddr = (addr & 0xfff) >> 2;
switch (saddr) {
@@ -937,8 +944,9 @@ static uint64_t gt64120_readl (void *opaque,
break;
}
- if (!(s->regs[GT_CPU] & 0x00001000))
+ if (!(s->regs[GT_CPU] & 0x00001000)) {
val = bswap32(val);
+ }
return val;
}
@@ -990,8 +998,9 @@ static void gt64120_pci_set_irq(void *opaque, int irq_num,
int level)
/* The pic level is the logical OR of all the PCI irqs mapped to it. */
pic_level = 0;
for (i = 0; i < 4; i++) {
- if (pic_irq == piix4_dev->config[0x60 + i])
+ if (pic_irq == piix4_dev->config[0x60 + i]) {
pic_level |= pci_irq_levels[i];
+ }
}
qemu_set_irq(pic[pic_irq], pic_level);
}
--
2.7.4
- [Qemu-devel] [PULL 00/17] MIPS queue for June 2016th, 2019, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 04/17] hw/mips/gt64xxx_pci: Fix 'spaces' coding style issues, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 03/17] hw/mips/gt64xxx_pci: Fix 'braces' coding style issues,
Aleksandar Markovic <=
- [Qemu-devel] [PULL 07/17] hw/mips/gt64xxx_pci: Align the pci0-mem size, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 09/17] dma/rc4030: Minor code style cleanup, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 01/17] hw/mips/gt64xxx_pci: Fix multiline comment syntax, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 08/17] dma/rc4030: Fix off-by-one error in specified memory region size, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 05/17] hw/mips/gt64xxx_pci: Use qemu_log_mask() instead of debug printf(), Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 02/17] hw/mips/gt64xxx_pci: Fix 'tabs' coding style issues, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 11/17] tests/tcg: target/mips: Add tests for MSA move instructions, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 06/17] hw/mips/gt64xxx_pci: Convert debug printf()s to trace events, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 17/17] target/mips: Fix big endian host behavior for interleave MSA instructions, Aleksandar Markovic, 2019/06/26
- [Qemu-devel] [PULL 16/17] tests/tcg: target/mips: Fix some test cases for pack MSA instructions, Aleksandar Markovic, 2019/06/26