[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/7] hw/ide/pci.c: Coding style update to fix checkpatch error
From: |
BALATON Zoltan |
Subject: |
[PATCH v2 4/7] hw/ide/pci.c: Coding style update to fix checkpatch errors |
Date: |
Tue, 17 Mar 2020 10:39:17 +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 v2 0/7] Misc hw/ide legacy clean up, BALATON Zoltan, 2020/03/17
- [PATCH v2 4/7] hw/ide/pci.c: Coding style update to fix checkpatch errors,
BALATON Zoltan <=
- [PATCH v2 3/7] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h, BALATON Zoltan, 2020/03/17
- [PATCH v2 1/7] hw/ide: Get rid of piix3_init functions, BALATON Zoltan, 2020/03/17
- [PATCH v2 7/7] hw/ide: Remove unneeded inclusion of hw/ide.h, BALATON Zoltan, 2020/03/17
- [PATCH v2 2/7] hw/ide: Get rid of piix4_init function, BALATON Zoltan, 2020/03/17
- Re: [PATCH v2 2/7] hw/ide: Get rid of piix4_init function, Philippe Mathieu-Daudé, 2020/03/17
- Re: [PATCH v2 2/7] hw/ide: Get rid of piix4_init function, Philippe Mathieu-Daudé, 2020/03/17
- Re: [PATCH v2 2/7] hw/ide: Get rid of piix4_init function, John Snow, 2020/03/17
- Re: [PATCH v2 2/7] hw/ide: Get rid of piix4_init function, Philippe Mathieu-Daudé, 2020/03/17
- Re: [PATCH v2 2/7] hw/ide: Get rid of piix4_init function, BALATON Zoltan, 2020/03/17
- Re: [PATCH v2 2/7] hw/ide: Get rid of piix4_init function, Philippe Mathieu-Daudé, 2020/03/17