Skip to contentSkip to conversation

drivers/ide/: cleanups

PATCH In review Adrian Bunk 6 participants 11 messages Jul 11, 2006 – Jul 15, 2006 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/ide/: cleanups

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()
- ide.c: remove the unused EXPORT_SYMBOL(ide_register_hw)
- ide-dma.c: remove the unused EXPORT_SYMBOL_GPL(ide_in_drive_list)

---

This patch was already sent on:
- 9 Jul 2006
- 26 Jun 2006
- 27 Apr 2006
- 19 Apr 2006
- 11 Apr 2006

 drivers/ide/ide-dma.c   |    2 --
 drivers/ide/ide.c       |    2 --
 drivers/ide/setup-pci.c |    4 +++-
 include/linux/ide.h     |    1 -
 4 files changed, 3 insertions(+), 6 deletions(-)
include/linux/ide.h renamed from include/linux/ide.h.old +0 -1
@@ -1188,7 +1188,6 @@
 extern void ide_scan_pcibus(int scan_direction) __init;
 extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner);
 #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE)
-extern void ide_pci_unregister_driver(struct pci_driver *driver);
 void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *);
 extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d);
 
drivers/ide/ide.c renamed from drivers/ide/ide.c.old +0 -2
@@ -826,8 +826,6 @@
 	return ide_register_hw_with_fixup(hw, hwifp, NULL);
 }
 
-EXPORT_SYMBOL(ide_register_hw);
-
 /*
  *	Locks for IDE setting functionality
  */
drivers/ide/ide-dma.c renamed from drivers/ide/ide-dma.c.old +0 -2
@@ -152,8 +152,6 @@
 	return 0;
 }
 
-EXPORT_SYMBOL_GPL(ide_in_drive_list);
-
 /**
  *	ide_dma_intr	-	IDE DMA interrupt handler
  *	@drive: the drive the interrupt is for
drivers/ide/setup-pci.c renamed from drivers/ide/setup-pci.c.old +3 -1
@@ -807,7 +807,8 @@
  *	Unregister a currently installed IDE driver. Returns are the same
  *	as for pci_unregister_driver
  */
- 
+
+#if 0
 void ide_pci_unregister_driver(struct pci_driver *driver)
 {
 	if(!pre_init)
@@ -817,6 +818,7 @@
 }
 
 EXPORT_SYMBOL_GPL(ide_pci_unregister_driver);
+#endif  /*  0  */
 
 /**
  *	ide_scan_pcidev		-	find an IDE driver for a device
#1 lore raw
Quoted 2 lines · Adrian Bunk

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()

Hmm. So, ide drivers will be unloadable forever, without a chance to fix it someday? ;)

Thanks.

/mjt

#2 lore raw
Quoted 6 lines · Michael Tokarev
Quoted 2 lines · Adrian Bunk

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()

Hmm. So, ide drivers will be unloadable forever, without a chance to fix it someday? ;)

that's why it's #if 0... so that if someone goes in to fix it he only has to remove the if 0 line...

#5 lore raw
In reply to Adrian Bunk

Hello.

Quoted 3 lines · Adrian Bunk

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()
- ide.c: remove the unused EXPORT_SYMBOL(ide_register_hw)

It's used by arm/bast-ide.c (CONFIG_NLK_DEV_IDE_BAST is defined as
tristate). I don't understand what's the point insisting on its removal since any SOC modular driver in the future may need it...

Quoted 3 lines

- ide-dma.c: remove the unused EXPORT_SYMBOL_GPL(ide_in_drive_list)

WBR, Sergei

#6 lore raw

PATCH 1/1 drivers/ide/: cleanups

Quoted 10 lines · Sergei Shtylyov

Hello.

Quoted 3 lines · Adrian Bunk

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()
- ide.c: remove the unused EXPORT_SYMBOL(ide_register_hw)

It's used by arm/bast-ide.c (CONFIG_NLK_DEV_IDE_BAST is defined as
tristate).

Sorry, my fault.

I did grep and check the options, but it seems I missed this one.

Updated patch below.

Quoted 2 lines

I don't understand what's the point insisting on its removal since any SOC modular driver in the future may need it...

There are two points:
- re-adding is trivial if it's ever needed, but until then it only bloats the kernel
- drivers/ide/ are the legacy IDE drivers that will be superseded by libata

Quoted 2 lines

...
WBR, Sergei

cu
Adrian

<-- snip -->

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()
- ide-dma.c: remove the unused EXPORT_SYMBOL_GPL(ide_in_drive_list)

---

 drivers/ide/ide-dma.c   |    2 --
 drivers/ide/setup-pci.c |    4 +++-
 include/linux/ide.h     |    1 -
 3 files changed, 3 insertions(+), 4 deletions(-)
include/linux/ide.h renamed from include/linux/ide.h.old +0 -1
@@ -1188,7 +1188,6 @@
 extern void ide_scan_pcibus(int scan_direction) __init;
 extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner);
 #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE)
-extern void ide_pci_unregister_driver(struct pci_driver *driver);
 void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *);
 extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d);
 
drivers/ide/ide-dma.c renamed from drivers/ide/ide-dma.c.old +0 -2
@@ -152,8 +152,6 @@
 	return 0;
 }
 
-EXPORT_SYMBOL_GPL(ide_in_drive_list);
-
 /**
  *	ide_dma_intr	-	IDE DMA interrupt handler
  *	@drive: the drive the interrupt is for
drivers/ide/setup-pci.c renamed from drivers/ide/setup-pci.c.old +3 -1
@@ -807,7 +807,8 @@
  *	Unregister a currently installed IDE driver. Returns are the same
  *	as for pci_unregister_driver
  */
- 
+
+#if 0
 void ide_pci_unregister_driver(struct pci_driver *driver)
 {
 	if(!pre_init)
@@ -817,6 +818,7 @@
 }
 
 EXPORT_SYMBOL_GPL(ide_pci_unregister_driver);
+#endif  /*  0  */
 
 /**
  *	ide_scan_pcidev		-	find an IDE driver for a device
#7 lore raw
In reply to Adrian Bunk

Ar Maw, 2006-07-11 am 16:16 +0200, ysgrifennodd Adrian Bunk:

Quoted 3 lines

This patch contains the following cleanups:

- ide.c: remove the unused EXPORT_SYMBOL(ide_register_hw)

NAK. A simple grep shows ide_register_hw has users, 5 in fact as of 2.6.17.

#3 lore raw
In reply to Michael Tokarev

Ar Maw, 2006-07-11 am 18:30 +0400, ysgrifennodd Michael Tokarev:

Quoted 6 lines
Quoted 2 lines · Adrian Bunk

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()

Hmm. So, ide drivers will be unloadable forever, without a chance to fix it someday? ;)

If you want removable IDE drivers use 2.4-ac or follow the libata work. drivers/ide is on its way out. In fact Adrian, just deleting that function would be a better patch.

Alan

#8 lore raw
In reply to Alan Cox
Quoted 7 lines · Alan Cox

Ar Maw, 2006-07-11 am 16:16 +0200, ysgrifennodd Adrian Bunk:

Quoted 3 lines

This patch contains the following cleanups:

- ide.c: remove the unused EXPORT_SYMBOL(ide_register_hw)

NAK. A simple grep shows ide_register_hw has users, 5 in fact as of 2.6.17.

I know, and I checked them, and Sergei already pointed out that I missed the one that can be modular.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#9 lore raw
In reply to Adrian Bunk
Quoted 3 lines · Adrian Bunk

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()
- ide.c: remove the unused EXPORT_SYMBOL(ide_register_hw)

Unused ? The PowerMac media-bay code uses it. It's not yet module-able but I haven't given up on it just yet :)

Ben.

Quoted 79 lines

- ide-dma.c: remove the unused EXPORT_SYMBOL_GPL(ide_in_drive_list)

---

This patch was already sent on:
- 9 Jul 2006
- 26 Jun 2006
- 27 Apr 2006
- 19 Apr 2006
- 11 Apr 2006

 drivers/ide/ide-dma.c   |    2 --
 drivers/ide/ide.c       |    2 --
 drivers/ide/setup-pci.c |    4 +++-
 include/linux/ide.h     |    1 -
 4 files changed, 3 insertions(+), 6 deletions(-)
include/linux/ide.h renamed from include/linux/ide.h.old +0 -1
@@ -1188,7 +1188,6 @@
 extern void ide_scan_pcibus(int scan_direction) __init;
 extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner);
 #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE)
-extern void ide_pci_unregister_driver(struct pci_driver *driver);
 void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *);
 extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d);
 
drivers/ide/ide.c renamed from drivers/ide/ide.c.old +0 -2
@@ -826,8 +826,6 @@
 	return ide_register_hw_with_fixup(hw, hwifp, NULL);
 }
 
-EXPORT_SYMBOL(ide_register_hw);
-
 /*
  *	Locks for IDE setting functionality
  */
drivers/ide/ide-dma.c renamed from drivers/ide/ide-dma.c.old +0 -2
@@ -152,8 +152,6 @@
 	return 0;
 }
 
-EXPORT_SYMBOL_GPL(ide_in_drive_list);
-
 /**
  *	ide_dma_intr	-	IDE DMA interrupt handler
  *	@drive: the drive the interrupt is for
drivers/ide/setup-pci.c renamed from drivers/ide/setup-pci.c.old +3 -2
@@ -807,7 +807,8 @@
  *	Unregister a currently installed IDE driver. Returns are the same
  *	as for pci_unregister_driver
  */
- 
+
+#if 0
 void ide_pci_unregister_driver(struct pci_driver *driver)
 {
 	if(!pre_init)
@@ -817,6 +818,7 @@
 }
 
 EXPORT_SYMBOL_GPL(ide_pci_unregister_driver);
+#endif  /*  0  */
 
 /**
  *	ide_scan_pcidev		-	find an IDE driver for a device
 
 
 
 
-

To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines · Adrian Bunk

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()
- ide.c: remove the unused EXPORT_SYMBOL(ide_register_hw)

Unused ? The PowerMac media-bay code uses it. It's not yet module-able but I haven't given up on it just yet :)

It's even used by drivers/ide/arm/bast-ide.c that can be modular (which I missed). -mm therefore contains the updated version I sent later in this thread that does no longer contain this unexport.

Quoted 1 line

Ben.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#4 lore raw

PATCH 1/1 drivers/ide/: cleanups

In reply to Alan Cox
Quoted 11 lines · Alan Cox

Ar Maw, 2006-07-11 am 18:30 +0400, ysgrifennodd Michael Tokarev:

Quoted 6 lines
Quoted 2 lines · Adrian Bunk

This patch contains the following clenups:
- setup-pci.c: #if 0 the unused ide_pci_unregister_driver()

Hmm. So, ide drivers will be unloadable forever, without a chance to fix it someday? ;)

If you want removable IDE drivers use 2.4-ac or follow the libata work. drivers/ide is on its way out. In fact Adrian, just deleting that function would be a better patch.

OK, below is a version doing this.

Quoted 1 line

Alan

cu
Adrian

<-- snip -->

This patch contains the following clenups:
- setup-pci.c: remove the unused ide_pci_unregister_driver()
- ide-dma.c: remove the unused EXPORT_SYMBOL_GPL(ide_in_drive_list)

---

 drivers/ide/ide-dma.c   |    2 --
 drivers/ide/setup-pci.c |   18 ------------------
 include/linux/ide.h     |    1 -
 3 files changed, 21 deletions(-)
include/linux/ide.h renamed from include/linux/ide.h.old +0 -1
@@ -1188,7 +1188,6 @@
 extern void ide_scan_pcibus(int scan_direction) __init;
 extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner);
 #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE)
-extern void ide_pci_unregister_driver(struct pci_driver *driver);
 void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *);
 extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d);
 
drivers/ide/ide-dma.c renamed from drivers/ide/ide-dma.c.old +0 -2
@@ -152,8 +152,6 @@
 	return 0;
 }
 
-EXPORT_SYMBOL_GPL(ide_in_drive_list);
-
 /**
  *	ide_dma_intr	-	IDE DMA interrupt handler
  *	@drive: the drive the interrupt is for
drivers/ide/setup-pci.c renamed from drivers/ide/setup-pci.c.old +0 -18
@@ -795,24 +795,6 @@
 EXPORT_SYMBOL_GPL(__ide_pci_register_driver);
 
 /**
- *	ide_unregister_pci_driver	-	unregister an IDE driver
- *	@driver: driver to remove
- *
- *	Unregister a currently installed IDE driver. Returns are the same
- *	as for pci_unregister_driver
- */
- 
-void ide_pci_unregister_driver(struct pci_driver *driver)
-{
-	if(!pre_init)
-		pci_unregister_driver(driver);
-	else
-		list_del(&driver->node);
-}
-
-EXPORT_SYMBOL_GPL(ide_pci_unregister_driver);
-
-/**
  *	ide_scan_pcidev		-	find an IDE driver for a device
  *	@dev: PCI device to check
  *