This patch contains the following possible cleanups:
- make some needlessly global code static
- ide-dma.c: remove the unneeded EXPORT_SYMBOL(__ide_dma_test_irq)
Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
---
drivers/ide/ide-dma.c | 15 +++
drivers/ide/ide-iops.c | 10 ++
drivers/ide/ide-pnp.c |2 +-
drivers/ide/ide.c | 10 +-
drivers/ide/legacy/ide-cs.c |2 +-
include/linux/ide.h | 12
6 files changed, 20 insertions(+), 31 deletions(-)
--- linux-2.6.11-rc2-mm2-full/drivers/ide/legacy/ide-cs.c.old 2005-01-31
19:22:47.0 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/ide/legacy/ide-cs.c 2005-01-31
19:23:02.0 +0100
@@ -209,7 +209,7 @@
#define CS_CHECK(fn, ret) \
do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-void ide_config(dev_link_t *link)
+static void ide_config(dev_link_t *link)
{
client_handle_t handle = link-handle;
ide_info_t *info = link-priv;
--- linux-2.6.11-rc2-mm2-full/include/linux/ide.h.old 2005-01-31
19:25:55.0 +0100
+++ linux-2.6.11-rc2-mm2-full/include/linux/ide.h 2005-01-31
19:34:33.0 +0100
@@ -1293,8 +1293,6 @@
extern void SELECT_MASK(ide_drive_t *, int);
extern void QUIRK_LIST(ide_drive_t *);
-extern void ata_input_data(ide_drive_t *, void *, u32);
-extern void ata_output_data(ide_drive_t *, void *, u32);
extern void atapi_input_bytes(ide_drive_t *, void *, u32);
extern void atapi_output_bytes(ide_drive_t *, void *, u32);
@@ -1337,14 +1335,6 @@
ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
sector_t block);
/*
- * ide_system_bus_speed() returns what we think is the system VESA/PCI
- * bus speed (in MHz). This is used for calculating interface PIO timings.
- * The default is 40 for known PCI systems, 50 otherwise.
- * The idebus=xx parameter can be used to override this value.
- */
-extern int ide_system_bus_speed(void);
-
-/*
* ide_stall_queue() can be used by a drive to give excess bandwidth back
* to the hwgroup by sleeping for timeout jiffies.
*/
@@ -1360,7 +1350,6 @@
extern void ide_unpin_hwgroup(ide_drive_t *);
extern struct block_device_operations ide_fops[];
-extern ide_proc_entry_t generic_subdriver_entries[];
extern int ata_attach(ide_drive_t *);
@@ -1456,7 +1445,6 @@
extern int ide_dma_setup(ide_drive_t *);
extern void ide_dma_start(ide_drive_t *);
extern int __ide_dma_end(ide_drive_t *);
-extern int __ide_dma_test_irq(ide_drive_t *);
extern int __ide_dma_lostirq(ide_drive_t *);
extern int __ide_dma_timeout(ide_drive_t *);
#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
--- linux-2.6.11-rc2-mm2-full/drivers/ide/ide.c.old 2005-01-31
19:25:14.0 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/ide/ide.c 2005-01-31 19:28:46.0
+0100
@@ -333,7 +333,7 @@
* Returns a guessed speed in MHz.
*/
-int ide_system_bus_speed (void)
+static int ide_system_bus_speed (void)
{
static struct pci_device_id pci_default[] = {
{ PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) },
@@ -414,7 +414,7 @@
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_ide_root;
-ide_proc_entry_t generic_subdriver_entries[] = {
+static ide_proc_entry_t generic_subdriver_entries[] = {
{ capacity, S_IFREG|S_IRUGO,proc_ide_read_capacity, NULL },
{ NULL, 0, NULL, NULL }
};
@@ -1684,7 +1684,7 @@
*
* Remember to update Documentation/ide.txt if you change something here.
*/
-int __init ide_setup (char *s)
+static int __init ide_setup (char *s)
{
int i, vals[3];
ide_hwif_t *hwif;
@@ -2248,7 +2248,7 @@
/*
* This is gets invoked once during initialization, to set *everything* up
*/
-int __init ide_init (void)
+static int __init ide_init (void)
{
printk(KERN_INFO Uniform Multi-Platform E-IDE driver REVISION \n);
devfs_mk_dir(ide);
@@ -2295,7 +2295,7 @@
}
#ifdef MODULE
-char *options = NULL;
+static char *options = NULL;
module_param(options, charp, 0);
MODULE_LICENSE(GPL);
--- linux-2.6.11-rc2-mm2-full/drivers/ide/ide-pnp.c.old 2005-01-31
19:29:26.0 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/ide/ide-pnp.c 2005-01-31
19:29:39.0 +0100
@@ -21,7 +21,7 @@
#include linux/ide.h
/* Add your devices here :)) */
-struct pnp_device_id idepnp_devices[] = {
+static struct pnp_device_id idepnp_devices[] = {
/* Generic ESDI/IDE/ATA compatible hard disk controller */
{.id = PNP0600, .driver_data = 0},
{.id = }
--- linux-2.6.11-rc2-mm2-full/drivers/ide/ide-iops.c.old2005-01-31
19:30:18.0 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/ide/ide-iops.c2005-01-31
19:38:28.0 +0100
@@ -30,6 +30,8 @@
#include asm/uaccess.h
#include asm/io.h
+static void ata_input_data (ide_drive_t *drive, void *buffer, u32 wcount);
+static void ata_output_data (ide_drive_t *drive, void *buffer, u32 wcount);
/*
* Conventional