[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors
From: |
John Snow |
Subject: |
[PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors |
Date: |
Tue, 17 Mar 2020 19:23:26 -0400 |
From: BALATON Zoltan <address@hidden>
Spaces are required around a + operator and if statements should have
braces even for single line. Also make it simpler by reversing the
condition instead of breaking the loop.
Signed-off-by: BALATON Zoltan <address@hidden>
Reviewed-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>
---
hw/ide/pci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 4fc76c5225..e0c84392e2 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -485,9 +485,9 @@ void pci_ide_create_devs(PCIDevice *dev, DriveInfo
**hd_table)
int i;
for (i = 0; i < 4; i++) {
- if (hd_table[i] == NULL)
- continue;
- ide_create_drive(d->bus+bus[i], unit[i], hd_table[i]);
+ if (hd_table[i]) {
+ ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]);
+ }
}
}
--
2.21.1
- [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE, (continued)
- [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE, John Snow, 2020/03/17
- [PULL 08/20] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value, John Snow, 2020/03/17
- [PULL 09/20] via-ide: initialise IDE controller in legacy mode, John Snow, 2020/03/17
- [PULL 10/20] via-ide: allow guests to write to PCI_CLASS_PROG, John Snow, 2020/03/17
- [PULL 11/20] via-ide: always use legacy IRQ 14/15 routing, John Snow, 2020/03/17
- [PULL 12/20] hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr(), John Snow, 2020/03/17
- [PULL 13/20] hw/ide: Get rid of piix3_init functions, John Snow, 2020/03/17
- [PULL 14/20] hw/isa/piix4.c: Introduce variable to store devfn, John Snow, 2020/03/17
- [PULL 15/20] hw/ide: Get rid of piix4_init function, John Snow, 2020/03/17
- [PULL 16/20] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h, John Snow, 2020/03/17
- [PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors,
John Snow <=
- [PULL 18/20] hw/ide: Do ide_drive_get() within pci_ide_create_devs(), John Snow, 2020/03/17
- [PULL 19/20] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h, John Snow, 2020/03/17
- [PULL 20/20] hw/ide: Remove unneeded inclusion of hw/ide.h, John Snow, 2020/03/17
- Re: [PULL 00/20] Ide patches, Peter Maydell, 2020/03/19