Skip to contentSkip to conversation

small libata cleanup

PATCH New Christoph Hellwig 2 participants 4 messages Sep 22, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Tejun,

this series cleans up the few architecture libata-portmap.h headers we have, and removes the odd asm-generic/libata-portmap.h one.

#1 lore raw

PATCH 1/2 libata: remove unused definitions from <asm/libata-portmap.h>

---
 arch/ia64/include/asm/libata-portmap.h    | 4 ----
 arch/powerpc/include/asm/libata-portmap.h | 4 ----
 2 files changed, 8 deletions(-)
arch/ia64/include/asm/libata-portmap.h +0 -4
index 0e00c9a..7a1f831 100644
@@ -1,12 +1,8 @@
 #ifndef __ASM_IA64_LIBATA_PORTMAP_H
 #define __ASM_IA64_LIBATA_PORTMAP_H
 
-#define ATA_PRIMARY_CMD		0x1F0
-#define ATA_PRIMARY_CTL		0x3F6
 #define ATA_PRIMARY_IRQ(dev)	isa_irq_to_vector(14)
 
-#define ATA_SECONDARY_CMD	0x170
-#define ATA_SECONDARY_CTL	0x376
 #define ATA_SECONDARY_IRQ(dev)	isa_irq_to_vector(15)
 
 #endif
arch/powerpc/include/asm/libata-portmap.h +0 -4
index 4d85180..4396db5 100644
@@ -1,12 +1,8 @@
 #ifndef __ASM_POWERPC_LIBATA_PORTMAP_H
 #define __ASM_POWERPC_LIBATA_PORTMAP_H
 
-#define ATA_PRIMARY_CMD	0x1F0
-#define ATA_PRIMARY_CTL	0x3F6
 #define ATA_PRIMARY_IRQ(dev)	pci_get_legacy_ide_irq(dev, 0)
 
-#define ATA_SECONDARY_CMD	0x170
-#define ATA_SECONDARY_CTL	0x376
 #define ATA_SECONDARY_IRQ(dev)	pci_get_legacy_ide_irq(dev, 1)
 
 #endif
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/2 libata: remove <asm-generic/libata-portmap.h>

In reply to Christoph Hellwig

asm-generic is only intended for architecture defaults, and we can simply kill it off by moving the two defintions directly to <linux/libata.h>.

---
 include/asm-generic/libata-portmap.h | 7 -------
 include/linux/libata.h               | 3 ++-
 2 files changed, 2 insertions(+), 8 deletions(-)
 delete mode 100644 include/asm-generic/libata-portmap.h
include/asm-generic/libata-portmap.h deleted +0 -7
deleted file mode 100644
index cf14f2f..0000000
@@ -1,7 +0,0 @@
-#ifndef __ASM_GENERIC_LIBATA_PORTMAP_H
-#define __ASM_GENERIC_LIBATA_PORTMAP_H
-
-#define ATA_PRIMARY_IRQ(dev)	14
-#define ATA_SECONDARY_IRQ(dev)	15
-
-#endif
include/linux/libata.h +2 -1
index e37d4f9..616eef4 100644
@@ -46,7 +46,8 @@
 #ifdef CONFIG_ATA_NONSTANDARD
 #include <asm/libata-portmap.h>
 #else
-#include <asm-generic/libata-portmap.h>
+#define ATA_PRIMARY_IRQ(dev)	14
+#define ATA_SECONDARY_IRQ(dev)	15
 #endif
 
 /*
Signature · 1 line
2.1.4
#3 lore raw
In reply to Christoph Hellwig
Quoted 4 lines · Christoph Hellwig

Hi Tejun,

this series cleans up the few architecture libata-portmap.h headers we have, and removes the odd asm-generic/libata-portmap.h one.

Applied 1-2 to libata/for-4.9.

Thanks.

Signature · 1 line
tejun