[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 5/8] hw/ide/pci.c: Coding style update to fix checkpatch error
From: |
BALATON Zoltan |
Subject: |
[PATCH v3 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors |
Date: |
Tue, 17 Mar 2020 16:05:37 +0100 |
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>
---
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
- [PATCH v3 0/8] Misc hw/ide legacy clean up, BALATON Zoltan, 2020/03/17
- [PATCH v3 2/8] hw/isa/piix4.c: Introduce variable to store devfn, BALATON Zoltan, 2020/03/17
- [PATCH v3 8/8] hw/ide: Remove unneeded inclusion of hw/ide.h, BALATON Zoltan, 2020/03/17
- [PATCH v3 4/8] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h, BALATON Zoltan, 2020/03/17
- [PATCH v3 1/8] hw/ide: Get rid of piix3_init functions, BALATON Zoltan, 2020/03/17
- [PATCH v3 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors,
BALATON Zoltan <=
- [PATCH v3 3/8] hw/ide: Get rid of piix4_init function, BALATON Zoltan, 2020/03/17
- [PATCH v3 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs(), BALATON Zoltan, 2020/03/17
- [PATCH v3 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h, BALATON Zoltan, 2020/03/17
- Re: [PATCH v3 0/8] Misc hw/ide legacy clean up, John Snow, 2020/03/17
- Re: [PATCH v3 0/8] Misc hw/ide legacy clean up, John Snow, 2020/03/17