Skip to contentSkip to conversation

hw/ide: Remove duplicated definitions from ahci_internal.h

PATCH Superseded Thomas Huth 2 participants 2 messages Dec 1, 2017 – Dec 5, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/ide: Remove duplicated definitions from ahci_internal.h

The same definitions can also be found in include/hw/ide/ahci.h so let's remove these #defines from ahci_internal.h.

---
 hw/ide/ahci_internal.h | 7 -------
 1 file changed, 7 deletions(-)
hw/ide/ahci_internal.h +0 -7
index ce2e818..1080a34 100644
@@ -375,11 +375,4 @@ void ahci_uninit(AHCIState *s);
 
 void ahci_reset(AHCIState *s);
 
-#define TYPE_SYSBUS_AHCI "sysbus-ahci"
-#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
-
-#define TYPE_ALLWINNER_AHCI "allwinner-ahci"
-#define ALLWINNER_AHCI(obj) OBJECT_CHECK(AllwinnerAHCIState, (obj), \
-                       TYPE_ALLWINNER_AHCI)
-
 #endif /* HW_IDE_AHCI_H */
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 15 lines · Thomas Huth

The same definitions can also be found in include/hw/ide/ahci.h so let's remove these #defines from ahci_internal.h.

---
 hw/ide/ahci_internal.h | 7 -------
 1 file changed, 7 deletions(-)
hw/ide/ahci_internal.h +0 -0
index ce2e818..1080a34 100644
@@ -375,11 +375,4 @@ void ahci_uninit(AHCIState *s);
 

hw/ide/ahci_internal.h void ahci_uninit(AHCIState *s); · line 378

Quoted 10 lines
hw/ide/ahci_internal.h +0 -7
 void ahci_reset(AHCIState *s);
 
-#define TYPE_SYSBUS_AHCI "sysbus-ahci"
-#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
-
-#define TYPE_ALLWINNER_AHCI "allwinner-ahci"
-#define ALLWINNER_AHCI(obj) OBJECT_CHECK(AllwinnerAHCIState, (obj), \
-                       TYPE_ALLWINNER_AHCI)
-
 #endif /* HW_IDE_AHCI_H */

Whoops, looks like I got a little carried away with my split and didn't quite finish the job :(

Sadly, TYPE_ICH9_AHCI is also duplicated ... and used outside of the core layer. Would you like to do v2 or shall I?