drivers/pci/: possible cleanups
RFC PATCH 1/1 drivers/pci/: possible cleanups
This patch contains the following possible cleanups:
- pci-acpi.c: make OSC_UUID static
- remove the following unused functions:
- pci-acpi.c: acpi_query_osc
- pci-acpi.c: pci_osc_support_set
- pci.c: pci_find_ext_capability
- rom.c: pci_map_rom_copy
- rom.c: pci_remove_rom
- remove the following unneeded EXPORT_SYMBOL's:
- pci-acpi.c: pci_osc_support_set
- rom.c: pci_map_rom_copy
- rom.c: pci_remove_rom
Which of these changes are correct and which conflict with pending patches?
---
drivers/pci/pci-acpi.c | 97 --------------------------------------- drivers/pci/pci.c | 48 ------------------- drivers/pci/rom.c | 54 --------------------- include/linux/pci-acpi.h | 2 include/linux/pci.h | 4 - 5 files changed, 1 insertion(+), 204 deletions(-)
include/linux/pci-acpi.h renamed from include/linux/pci-acpi.h.old +0 -2
@@ -48,14 +48,12 @@#ifdef CONFIG_ACPI extern acpi_status pci_osc_control_set (u32 flags); -extern acpi_status pci_osc_support_set (u32 flags);#else #if !defined(acpi_status)typedef u32 acpi_status ;#define AE_ERROR (acpi_status) (0x0001)#endif static inline acpi_status pci_osc_control_set (u32 flags) {return AE_ERROR ;} -static inline acpi_status pci_osc_support_set (u32 flags) {return AE_ERROR ;}#endif #endif /* _PCI_ACPI_H_ */
drivers/pci/pci-acpi.c renamed from drivers/pci/pci-acpi.c.old +1 -96
109 lines not on this page · raw message
include/linux/pci.h renamed from include/linux/pci.h.old +0 -4
@@ -758,7 +758,6 @@struct pci_dev *pci_find_device_reverse (unsigned int vendor,unsigned int device,const struct pci_dev *from);struct pci_dev *pci_find_slot (unsigned int bus,unsigned int devfn);int pci_find_capability (struct pci_dev *dev,int cap); -int pci_find_ext_capability (struct pci_dev *dev,int cap);struct pci_bus *pci_find_next_bus (const struct pci_bus *from);struct pci_dev *pci_get_device (unsigned int vendor,unsigned int device,struct pci_dev *from);
@@ -815,9 +814,7 @@/* ROM control related routines */ void __iomem *pci_map_rom (struct pci_dev *pdev,size_t *size); -void __iomem *pci_map_rom_copy (struct pci_dev *pdev,size_t *size);void pci_unmap_rom (struct pci_dev *pdev,void __iomem *rom); -void pci_remove_rom (struct pci_dev *pdev);/* Power management related routines */ int pci_save_state (struct pci_dev *dev);
@@ -945,7 +942,6 @@static inline int pci_register_driver (struct pci_driver *drv) {return 0 ;}static inline void pci_unregister_driver (struct pci_driver *drv) { }static inline int pci_find_capability (struct pci_dev *dev,int cap) {return 0 ; } -static inline int pci_find_ext_capability (struct pci_dev *dev,int cap) {return 0 ; }static inline const struct pci_device_id *pci_match_device (const struct pci_device_id *ids,const struct pci_dev *dev) {return NULL ; }/* Power management related routines */
drivers/pci/pci.c renamed from drivers/pci/pci.c.old +0 -48
54 lines not on this page · raw message
drivers/pci/rom.c renamed from drivers/pci/rom.c.old +0 -54
70 lines not on this page · raw message
Quoted 4 lines · Adrian Bunk
This patch contains the following possible cleanups:
-pci-acpi.c: makeOSC_UUIDstatic
- remove the following unused functions:
-pci-acpi.c:acpi_query_osc
Quoted 8 lines
-
pci-acpi.c:pci_osc_support_set
-pci.c:pci_find_ext_capability
-rom.c:pci_map_rom_copy
-rom.c:pci_remove_rom
- remove the following unneeded EXPORT_SYMBOL's:
-pci-acpi.c:pci_osc_support_set
-rom.c:pci_map_rom_copy
-rom.c:pci_remove_rom
pci_map_rom_copy and pci_remove_rom are there to support boards that can't access their hardware and their ROM at the same time. These boards are known to exist but nobody has updated a driver yet to use the new routines. These should be left in place as the PCI spec explicitly allows the non-simultaneous access case.
pci_remove_rom should probably be renamed to pci_remove_rom_copy.
Signature · 2 lines
Jon Smirl [email protected]
Quoted 2 lines · Adrian Bunk
- remove the following unused functions:
-pci.c:pci_find_ext_capability
The pcie bridge driver ought to be using this. I haven't submitted that cleanup patch yet.
Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain
Quoted 6 lines · Matthew Wilcox
Quoted 2 lines · Adrian Bunk
- remove the following unused functions:
-pci.c:pci_find_ext_capabilityThe pcie bridge driver ought to be using this. I haven't submitted that cleanup patch yet.
Any news regarding your cleanup patch?
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