Skip to contentSkip to conversation

drivers/block/: some cleanups

PATCH In review Adrian Bunk 5 participants 23 messages Nov 25, 2004 – Feb 24, 2005

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

PATCH 1/1 drivers/block/: some cleanups

the patch below removes some unused code from drivers/block/, makes some needlessly global code static and does some other small cleanups.

Please review and comment.

diffstat output:

 drivers/block/cciss.c        |   18 +++------
 drivers/block/cciss_scsi.c   |   35 ++---------------
 drivers/block/cciss_scsi.h   |    1 
 drivers/block/cpqarray.c     |   13 +-----
 drivers/block/elevator.c     |    4 +-
 drivers/block/floppy.c       |    4 +-
 drivers/block/genhd.c        |    2 -
 drivers/block/loop.c         |    4 +-
 drivers/block/nbd.c          |    6 +--
 drivers/block/noop-iosched.c |   12 +++---
 drivers/block/paride/setup.h |   70 -----------------------------------
 drivers/block/pktcdvd.c      |    4 +-
 drivers/block/ps2esdi.c      |   42 ---------------------
 drivers/block/rd.c           |    4 +-
 drivers/block/ub.c           |    2 -
 drivers/block/umem.c         |    4 +-
 drivers/block/xd.c           |    2 -
 drivers/block/paride/pcd.c   |   22 -----------
 drivers/block/paride/pd.c    |   23 -----------
 drivers/block/paride/pf.c    |   23 -----------
 drivers/block/paride/pg.c    |   21 ----------
 drivers/block/paride/pt.c    |   22 -----------
 22 files changed, 42 insertions(+), 296 deletions(-)
drivers/block/cciss.c renamed from drivers/block/cciss.c.old +7 -11
@@ -61,7 +61,7 @@
 #include <linux/cciss_ioctl.h>
 
 /* define the PCI info for the cards we can control */
-const struct pci_device_id cciss_pci_device_id[] = {
+static const struct pci_device_id cciss_pci_device_id[] = {
 	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISS,
 			0x0E11, 0x4070, 0, 0, 0},
 	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB,
@@ -2908,21 +2908,17 @@
  *  This is it.  Register the PCI driver information for the cards we control
  *  the OS will call our registered routines when it finds one of our cards. 
  */
-int __init cciss_init(void)
+static int __init init_cciss(void)
 {
+	register_cciss_ioctl32();
+
 	printk(KERN_INFO DRIVER_NAME "\n");
 
 	/* Register for our PCI devices */
 	return pci_module_init(&cciss_pci_driver);
 }
 
-static int __init init_cciss_module(void)
-{
-	register_cciss_ioctl32();
-	return ( cciss_init());
-}
-
-static void __exit cleanup_cciss_module(void)
+static void __exit cleanup_cciss(void)
 {
 	int i;
 
@@ -2941,5 +2937,5 @@
 	remove_proc_entry("cciss", proc_root_driver);
 }
 
-module_init(init_cciss_module);
-module_exit(cleanup_cciss_module);
+module_init(init_cciss);
+module_exit(cleanup_cciss);
drivers/block/cciss_scsi.h renamed from drivers/block/cciss_scsi.h.old +0 -1
@@ -39,7 +39,6 @@
 #define SCSI_CCISS_CAN_QUEUE 2
 
 /* 
-	info:           	cciss_scsi_info,		\
 
 Note, cmd_per_lun could give us some trouble, so I'm setting it very low.
 Likewise, SCSI_CCISS_CAN_QUEUE is set very conservatively.
drivers/block/cciss_scsi.c renamed from drivers/block/cciss_scsi.c.old +4 -31
@@ -53,9 +53,7 @@
 	int cmd_type);
 
 
-const char *cciss_scsi_info(struct Scsi_Host *sa);
-
-int cciss_scsi_proc_info(
+static int cciss_scsi_proc_info(
 		struct Scsi_Host *sh,
 		char *buffer, /* data buffer */
 		char **start, 	   /* where data in buffer starts */
@@ -63,7 +61,7 @@
 		int length, 	   /* length of data in buffer */
 		int func);	   /* 0 == read, 1 == write */
 
-int cciss_scsi_queue_command (struct scsi_cmnd *cmd, 
+static int cciss_scsi_queue_command (struct scsi_cmnd *cmd, 
 		void (* done)(struct scsi_cmnd *));
 
 static struct cciss_scsi_hba_t ccissscsi[MAX_CTLR] = {
@@ -712,8 +710,6 @@
 	return 1;
 }
 
-static void __exit cleanup_cciss_module(void);
-
 static void
 cciss_unmap_one(struct pci_dev *pdev,
 		CommandList_struct *cp,
@@ -1114,7 +1110,7 @@
 }
 
 
-int
+static int
 cciss_scsi_proc_info(struct Scsi_Host *sh,
 		char *buffer, /* data buffer */
 		char **start, 	   /* where data in buffer starts */
@@ -1149,29 +1145,6 @@
 			buffer, length);	
 } 
 
-/* this is via the generic proc support */
-const char *
-cciss_scsi_info(struct Scsi_Host *sa)
-{
-	static char buf[300];
-	ctlr_info_t *ci;
-
-	/* probably need to work on putting a bit more info in here... */
-	/* this is output via the /proc filesystem. */
-
-	ci = (ctlr_info_t *) sa->hostdata[0];
-
-	sprintf(buf, "%s %c%c%c%c\n",
-		ci->product_name, 
-		ci->firm_ver[0],
-		ci->firm_ver[1],
-		ci->firm_ver[2],
-		ci->firm_ver[3]);
-
-	return buf; 
-}
-
-
 /* cciss_scatter_gather takes a struct scsi_cmnd, (cmd), and does the pci 
    dma mapping  and fills in the scatter gather entries of the 
    cciss command, cp. */
@@ -1225,7 +1198,7 @@
 }
 
 
-int 
+static int 
 cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *))
 {
 	ctlr_info_t **c;
drivers/block/cpqarray.c renamed from drivers/block/cpqarray.c.old +2 -11
@@ -97,7 +97,7 @@
 };
 
 /* define the PCI info for the PCI cards this driver can control */
-const struct pci_device_id cpqarray_pci_device_id[] =
+static const struct pci_device_id cpqarray_pci_device_id[] =
 {
 	{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_COMPAQ_42XX,
 		0x0E11, 0x4058, 0, 0, 0},       /* SA431 */
@@ -135,7 +135,6 @@
 /* Debug Extra Paranoid... */
 #define DBGPX(s) do { } while(0)
 
-int cpqarray_init_step2(void);
 static int cpqarray_pci_init(ctlr_info_t *c, struct pci_dev *pdev);
 static void __iomem *remap_pci_mem(ulong base, ulong size);
 static int cpqarray_eisa_detect(void);
@@ -312,14 +311,6 @@
 
 module_param_array(eisa, int, NULL, 0);
 
-/* This is a bit of a hack,
- * necessary to support both eisa and pci
- */
-int __init cpqarray_init(void)
-{
-	return (cpqarray_init_step2());
-}
-
 static void release_io_mem(ctlr_info_t *c)
 {
 	/* if IO mem was not protected do nothing */
@@ -560,7 +551,7 @@
  *  This is it.  Find all the controllers and register them.
  *  returns the number of block devices registered.
  */
-int __init cpqarray_init_step2(void)
+static int __init cpqarray_init(void)
 {
 	int num_cntlrs_reg = 0;
 	int i;
drivers/block/elevator.c renamed from drivers/block/elevator.c.old +2 -2
@@ -92,7 +92,7 @@
 }
 EXPORT_SYMBOL(elv_try_last_merge);
 
-struct elevator_type *elevator_find(const char *name)
+static struct elevator_type *elevator_find(const char *name)
 {
 	struct elevator_type *e = NULL;
 	struct list_head *entry;
@@ -222,7 +222,7 @@
 	kfree(e);
 }
 
-int elevator_global_init(void)
+static int elevator_global_init(void)
 {
 	return 0;
 }
drivers/block/floppy.c renamed from drivers/block/floppy.c.old +2 -2
@@ -4397,7 +4397,7 @@
 }
 #endif
 
-int __init floppy_init(void)
+static int __init floppy_init(void)
 {
 	int i, unit, drive;
 	int err, dr;
@@ -4738,7 +4738,7 @@
 
 #ifdef MODULE
 
-char *floppy;
+static char *floppy;
 
 static void unregister_devfs_entries(int drive)
 {
drivers/block/genhd.c renamed from drivers/block/genhd.c.old +1 -1
@@ -305,7 +305,7 @@
 	return NULL;
 }
 
-int __init device_init(void)
+static int __init device_init(void)
 {
 	bdev_map = kobj_map_init(base_probe, &block_subsys);
 	blk_dev_init();
drivers/block/loop.c renamed from drivers/block/loop.c.old +2 -2
@@ -1114,7 +1114,7 @@
 EXPORT_SYMBOL(loop_register_transfer);
 EXPORT_SYMBOL(loop_unregister_transfer);
 
-int __init loop_init(void)
+static int __init loop_init(void)
 {
 	int	i;
 
@@ -1189,7 +1189,7 @@
 	return -ENOMEM;
 }
 
-void loop_exit(void)
+static void loop_exit(void)
 {
 	int i;
 
drivers/block/nbd.c renamed from drivers/block/nbd.c.old +3 -3
@@ -315,7 +315,7 @@
 }
 
 /* NULL returned = something went wrong, inform userspace */
-struct request *nbd_read_stat(struct nbd_device *lo)
+static struct request *nbd_read_stat(struct nbd_device *lo)
 {
 	int result;
 	struct nbd_reply reply;
@@ -377,7 +377,7 @@
 	return NULL;
 }
 
-void nbd_do_it(struct nbd_device *lo)
+static void nbd_do_it(struct nbd_device *lo)
 {
 	struct request *req;
 
@@ -388,7 +388,7 @@
 	return;
 }
 
-void nbd_clear_que(struct nbd_device *lo)
+static void nbd_clear_que(struct nbd_device *lo)
 {
 	struct request *req;
 
drivers/block/noop-iosched.c renamed from drivers/block/noop-iosched.c.old +6 -6
@@ -17,7 +17,7 @@
 /*
  * See if we can find a request that this buffer can be coalesced with.
  */
-int elevator_noop_merge(request_queue_t *q, struct request **req,
+static int elevator_noop_merge(request_queue_t *q, struct request **req,
 			struct bio *bio)
 {
 	struct list_head *entry = &q->queue_head;
@@ -50,13 +50,13 @@
 	return ELEVATOR_NO_MERGE;
 }
 
-void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
+static void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
 				  struct request *next)
 {
 	list_del_init(&next->queuelist);
 }
 
-void elevator_noop_add_request(request_queue_t *q, struct request *rq,
+static void elevator_noop_add_request(request_queue_t *q, struct request *rq,
 			       int where)
 {
 	struct list_head *insert = q->queue_head.prev;
@@ -75,7 +75,7 @@
 		q->last_merge = rq;
 }
 
-struct request *elevator_noop_next_request(request_queue_t *q)
+static struct request *elevator_noop_next_request(request_queue_t *q)
 {
 	if (!list_empty(&q->queue_head))
 		return list_entry_rq(q->queue_head.next);
@@ -94,12 +94,12 @@
 	.elevator_owner = THIS_MODULE,
 };
 
-int noop_init(void)
+static int noop_init(void)
 {
 	return elv_register(&elevator_noop);
 }
 
-void noop_exit(void)
+static void noop_exit(void)
 {
 	elv_unregister(&elevator_noop);
 }
drivers/block/pktcdvd.c renamed from drivers/block/pktcdvd.c.old +2 -2
@@ -2627,7 +2627,7 @@
 	.fops  		= &pkt_ctl_fops
 };
 
-int pkt_init(void)
+static int pkt_init(void)
 {
 	int ret;
 
@@ -2663,7 +2663,7 @@
 	return ret;
 }
 
-void pkt_exit(void)
+static void pkt_exit(void)
 {
 	remove_proc_entry("pktcdvd", proc_root_driver);
 	misc_deregister(&pkt_misc);
drivers/block/ps2esdi.c renamed from drivers/block/ps2esdi.c.old +0 -42

48 lines not on this page · raw message

drivers/block/rd.c renamed from drivers/block/rd.c.old +2 -2
@@ -77,7 +77,7 @@
  * architecture-specific setup routine (from the stored boot sector
  * information).
  */
-int rd_size = CONFIG_BLK_DEV_RAM_SIZE;		/* Size of the RAM disks */
+static int rd_size = CONFIG_BLK_DEV_RAM_SIZE;	/* Size of the RAM disks */
 /*
  * It would be very desirable to have a soft-blocksize (that in the case
  * of the ramdisk driver is also the hardblocksize ;) of PAGE_SIZE because
@@ -89,7 +89,7 @@
  * behaviour. The default is still BLOCK_SIZE (needed by rd_load_image that
  * supposes the filesystem in the image uses a BLOCK_SIZE blocksize).
  */
-int rd_blocksize = BLOCK_SIZE;			/* blocksize of the RAM disks */
+static int rd_blocksize = BLOCK_SIZE;		/* blocksize of the RAM disks */
 
 /*
  * Copyright (C) 2000 Linus Torvalds.
drivers/block/ub.c renamed from drivers/block/ub.c.old +1 -1
@@ -2097,7 +2097,7 @@
 	spin_unlock_irqrestore(&ub_lock, flags);
 }
 
-struct usb_driver ub_driver = {
+static struct usb_driver ub_driver = {
 	.owner =	THIS_MODULE,
 	.name =		"ub",
 	.probe =	ub_probe,
drivers/block/umem.c renamed from drivers/block/umem.c.old +2 -2
@@ -1181,7 +1181,7 @@
 -----------------------------------------------------------------------------------
 */
 
-int __init mm_init(void)
+static int __init mm_init(void)
 {
 	int retval, i;
 	int err;
@@ -1232,7 +1232,7 @@
 --                             mm_cleanup
 -----------------------------------------------------------------------------------
 */
-void __exit mm_cleanup(void)
+static void __exit mm_cleanup(void)
 {
 	int i;
 
drivers/block/xd.c renamed from drivers/block/xd.c.old +1 -1
@@ -67,7 +67,7 @@
 /* Above may need to be increased if a problem with the 2nd drive detection
    (ST11M controller) or resetting a controller (WD) appears */
 
-XD_INFO xd_info[XD_MAXDRIVES];
+static XD_INFO xd_info[XD_MAXDRIVES];
 
 /* If you try this driver and find that your card is not detected by the driver at bootup, you need to add your BIOS
    signature and details to the following list of signatures. A BIOS signature is a string embedded into the first
drivers/block/paride/setup.h deleted +0 -69

69 lines not on this page · raw message

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

drivers/block/paride/pcd.c renamed from drivers/block/paride/pcd.c.old +1 -21
@@ -142,26 +142,6 @@
 
 static spinlock_t pcd_lock;
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pcd_stt[6] = {
-	{"drive0", 6, drive0},
-	{"drive1", 6, drive1},
-	{"drive2", 6, drive2},
-	{"drive3", 6, drive3},
-	{"disable", 1, &disable},
-	{"nice", 1, &nice}
-};
-
-void pcd_setup(char *str, int *ints)
-{
-	generic_setup(pcd_stt, 6, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -218,7 +198,7 @@
 	struct gendisk *disk;
 };
 
-struct pcd_unit pcd[PCD_UNITS];
+static struct pcd_unit pcd[PCD_UNITS];
 
 static char pcd_scratch[64];
 static char pcd_buffer[2048];	/* raw block buffer */
drivers/block/paride/pd.c renamed from drivers/block/paride/pd.c.old +1 -22
@@ -157,27 +157,6 @@
 
 static spinlock_t pd_lock = SPIN_LOCK_UNLOCKED;
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pd_stt[7] = {
-	{"drive0", 8, drive0},
-	{"drive1", 8, drive1},
-	{"drive2", 8, drive2},
-	{"drive3", 8, drive3},
-	{"disable", 1, &disable},
-	{"cluster", 1, &cluster},
-	{"nice", 1, &nice}
-};
-
-void pd_setup(char *str, int *ints)
-{
-	generic_setup(pd_stt, 7, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -255,7 +234,7 @@
 	struct gendisk *gd;
 };
 
-struct pd_unit pd[PD_UNITS];
+static struct pd_unit pd[PD_UNITS];
 
 static char pd_scratch[512];	/* scratch block buffer */
 
drivers/block/paride/pf.c renamed from drivers/block/paride/pf.c.old +1 -22
@@ -156,27 +156,6 @@
 
 static spinlock_t pf_spin_lock;
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pf_stt[7] = {
-	{"drive0", 7, drive0},
-	{"drive1", 7, drive1},
-	{"drive2", 7, drive2},
-	{"drive3", 7, drive3},
-	{"disable", 1, &disable},
-	{"cluster", 1, &cluster},
-	{"nice", 1, &nice}
-};
-
-void pf_setup(char *str, int *ints)
-{
-	generic_setup(pf_stt, 7, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -256,7 +235,7 @@
 	struct gendisk *disk;
 };
 
-struct pf_unit units[PF_UNITS];
+static struct pf_unit units[PF_UNITS];
 
 static int pf_identify(struct pf_unit *pf);
 static void pf_lock(struct pf_unit *pf, int func);
drivers/block/paride/pg.c renamed from drivers/block/paride/pg.c.old +1 -20
@@ -165,25 +165,6 @@
 
 #include <asm/uaccess.h>
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pg_stt[5] = {
-	{"drive0", 6, drive0},
-	{"drive1", 6, drive1},
-	{"drive2", 6, drive2},
-	{"drive3", 6, drive3},
-	{"disable", 1, &disable}
-};
-
-void pg_setup(char *str, int *ints)
-{
-	generic_setup(pg_stt, 5, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -235,7 +216,7 @@
 	char name[PG_NAMELEN];	/* pg0, pg1, ... */
 };
 
-struct pg devices[PG_UNITS];
+static struct pg devices[PG_UNITS];
 
 static int pg_identify(struct pg *dev, int log);
 
drivers/block/paride/pt.c renamed from drivers/block/paride/pt.c.old +1 -21
@@ -149,26 +149,6 @@
 
 #include <asm/uaccess.h>
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pt_stt[5] = {
-	{"drive0", 6, drive0},
-	{"drive1", 6, drive1},
-	{"drive2", 6, drive2},
-	{"drive3", 6, drive3},
-	{"disable", 1, &disable}
-};
-
-void
-pt_setup(char *str, int *ints)
-{
-	generic_setup(pt_stt, 5, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -246,7 +226,7 @@
 
 static int pt_identify(struct pt_unit *tape);
 
-struct pt_unit pt[PT_UNITS];
+static struct pt_unit pt[PT_UNITS];
 
 static char pt_scratch[512];	/* scratch block buffer */
 
#1 lore raw
Quoted 4 lines · Adrian Bunk

the patch below removes some unused code from drivers/block/, makes some needlessly global code static and does some other small cleanups.

Please review and comment.

Probably easier to review if split at a per-driver basis.

#2 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 4 lines · Adrian Bunk

the patch below removes some unused code from drivers/block/, makes some needlessly global code static and does some other small cleanups.

Please review and comment.

Probably easier to review if split at a per-driver basis.

Sounds reasonable.

Splitted diffs follow.

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
#3 lore raw

PATCH 1/1 drivers/block/genhd.c: make a function static

In reply to Christoph Hellwig

The patch below makes a needlessly global function static.

drivers/block/genhd.c renamed from drivers/block/genhd.c.old +1 -1
@@ -305,7 +305,7 @@
 	return NULL;
 }
 
-int __init device_init(void)
+static int __init device_init(void)
 {
 	bdev_map = kobj_map_init(base_probe, &block_subsys);
 	blk_dev_init();
#4 lore raw

PATCH 1/1 drivers/block/paride/ cleanups

In reply to Christoph Hellwig

The patch below does the following cleanups in each if the five changed C files:
- #ifndef MODULE: remove unused setup function
- make a needlessly global struct static

After this cleanup, setup.h is completely unuse and therefore removed.

diffstat output:

 drivers/block/paride/setup.h |   70 -----------------------------------
 drivers/block/paride/pcd.c   |   22 -----------
 drivers/block/paride/pd.c    |   23 -----------
 drivers/block/paride/pf.c    |   23 -----------
 drivers/block/paride/pg.c    |   21 ----------
 drivers/block/paride/pt.c    |   23 -----------
 6 files changed, 5 insertions(+), 177 deletions(-)
drivers/block/paride/pcd.c renamed from drivers/block/paride/pcd.c.old +1 -21
@@ -142,26 +142,6 @@
 
 static spinlock_t pcd_lock;
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pcd_stt[6] = {
-	{"drive0", 6, drive0},
-	{"drive1", 6, drive1},
-	{"drive2", 6, drive2},
-	{"drive3", 6, drive3},
-	{"disable", 1, &disable},
-	{"nice", 1, &nice}
-};
-
-void pcd_setup(char *str, int *ints)
-{
-	generic_setup(pcd_stt, 6, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -218,7 +198,7 @@
 	struct gendisk *disk;
 };
 
-struct pcd_unit pcd[PCD_UNITS];
+static struct pcd_unit pcd[PCD_UNITS];
 
 static char pcd_scratch[64];
 static char pcd_buffer[2048];	/* raw block buffer */
drivers/block/paride/pd.c renamed from drivers/block/paride/pd.c.old +1 -22
@@ -157,27 +157,6 @@
 
 static spinlock_t pd_lock = SPIN_LOCK_UNLOCKED;
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pd_stt[7] = {
-	{"drive0", 8, drive0},
-	{"drive1", 8, drive1},
-	{"drive2", 8, drive2},
-	{"drive3", 8, drive3},
-	{"disable", 1, &disable},
-	{"cluster", 1, &cluster},
-	{"nice", 1, &nice}
-};
-
-void pd_setup(char *str, int *ints)
-{
-	generic_setup(pd_stt, 7, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -255,7 +234,7 @@
 	struct gendisk *gd;
 };
 
-struct pd_unit pd[PD_UNITS];
+static struct pd_unit pd[PD_UNITS];
 
 static char pd_scratch[512];	/* scratch block buffer */
 
drivers/block/paride/pf.c renamed from drivers/block/paride/pf.c.old +1 -22
@@ -156,27 +156,6 @@
 
 static spinlock_t pf_spin_lock;
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pf_stt[7] = {
-	{"drive0", 7, drive0},
-	{"drive1", 7, drive1},
-	{"drive2", 7, drive2},
-	{"drive3", 7, drive3},
-	{"disable", 1, &disable},
-	{"cluster", 1, &cluster},
-	{"nice", 1, &nice}
-};
-
-void pf_setup(char *str, int *ints)
-{
-	generic_setup(pf_stt, 7, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -256,7 +235,7 @@
 	struct gendisk *disk;
 };
 
-struct pf_unit units[PF_UNITS];
+static struct pf_unit units[PF_UNITS];
 
 static int pf_identify(struct pf_unit *pf);
 static void pf_lock(struct pf_unit *pf, int func);
drivers/block/paride/pg.c renamed from drivers/block/paride/pg.c.old +1 -20
@@ -165,25 +165,6 @@
 
 #include <asm/uaccess.h>
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pg_stt[5] = {
-	{"drive0", 6, drive0},
-	{"drive1", 6, drive1},
-	{"drive2", 6, drive2},
-	{"drive3", 6, drive3},
-	{"disable", 1, &disable}
-};
-
-void pg_setup(char *str, int *ints)
-{
-	generic_setup(pg_stt, 5, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -235,7 +216,7 @@
 	char name[PG_NAMELEN];	/* pg0, pg1, ... */
 };
 
-struct pg devices[PG_UNITS];
+static struct pg devices[PG_UNITS];
 
 static int pg_identify(struct pg *dev, int log);
 
drivers/block/paride/pt.c renamed from drivers/block/paride/pt.c.old +1 -21
@@ -149,26 +149,6 @@
 
 #include <asm/uaccess.h>
 
-#ifndef MODULE
-
-#include "setup.h"
-
-static STT pt_stt[5] = {
-	{"drive0", 6, drive0},
-	{"drive1", 6, drive1},
-	{"drive2", 6, drive2},
-	{"drive3", 6, drive3},
-	{"disable", 1, &disable}
-};
-
-void
-pt_setup(char *str, int *ints)
-{
-	generic_setup(pt_stt, 5, str);
-}
-
-#endif
-
 MODULE_PARM(verbose, "i");
 MODULE_PARM(major, "i");
 MODULE_PARM(name, "s");
@@ -246,7 +226,7 @@
 
 static int pt_identify(struct pt_unit *tape);
 
-struct pt_unit pt[PT_UNITS];
+static struct pt_unit pt[PT_UNITS];
 
 static char pt_scratch[512];	/* scratch block buffer */
 

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

drivers/block/paride/setup.h deleted +0 -69

69 lines not on this page · raw message

#5 lore raw

PATCH 1/1 misc drivers/block/cciss* cleanups

In reply to Christoph Hellwig

The patch below contains the following changes:
- make some needlessly global code static
- fold init_cciss_module into init_cciss (there's no need for two separate functions)
- remove the unused global function cciss_scsi_info

 drivers/block/cciss.c      |   18 +++++++-----------
 drivers/block/cciss_scsi.c |   35 ++++-------------------------------
 drivers/block/cciss_scsi.h |    1 -
 3 files changed, 11 insertions(+), 43 deletions(-)
drivers/block/cciss.c renamed from drivers/block/cciss.c.old +7 -11
@@ -61,7 +61,7 @@
 #include <linux/cciss_ioctl.h>
 
 /* define the PCI info for the cards we can control */
-const struct pci_device_id cciss_pci_device_id[] = {
+static const struct pci_device_id cciss_pci_device_id[] = {
 	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISS,
 			0x0E11, 0x4070, 0, 0, 0},
 	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB,
@@ -2908,21 +2908,17 @@
  *  This is it.  Register the PCI driver information for the cards we control
  *  the OS will call our registered routines when it finds one of our cards. 
  */
-int __init cciss_init(void)
+static int __init init_cciss(void)
 {
+	register_cciss_ioctl32();
+
 	printk(KERN_INFO DRIVER_NAME "\n");
 
 	/* Register for our PCI devices */
 	return pci_module_init(&cciss_pci_driver);
 }
 
-static int __init init_cciss_module(void)
-{
-	register_cciss_ioctl32();
-	return ( cciss_init());
-}
-
-static void __exit cleanup_cciss_module(void)
+static void __exit cleanup_cciss(void)
 {
 	int i;
 
@@ -2941,5 +2937,5 @@
 	remove_proc_entry("cciss", proc_root_driver);
 }
 
-module_init(init_cciss_module);
-module_exit(cleanup_cciss_module);
+module_init(init_cciss);
+module_exit(cleanup_cciss);
drivers/block/cciss_scsi.c renamed from drivers/block/cciss_scsi.c.old +4 -31
@@ -53,9 +53,7 @@
 	int cmd_type);
 
 
-const char *cciss_scsi_info(struct Scsi_Host *sa);
-
-int cciss_scsi_proc_info(
+static int cciss_scsi_proc_info(
 		struct Scsi_Host *sh,
 		char *buffer, /* data buffer */
 		char **start, 	   /* where data in buffer starts */
@@ -63,7 +61,7 @@
 		int length, 	   /* length of data in buffer */
 		int func);	   /* 0 == read, 1 == write */
 
-int cciss_scsi_queue_command (struct scsi_cmnd *cmd, 
+static int cciss_scsi_queue_command (struct scsi_cmnd *cmd, 
 		void (* done)(struct scsi_cmnd *));
 
 static struct cciss_scsi_hba_t ccissscsi[MAX_CTLR] = {
@@ -712,8 +710,6 @@
 	return 1;
 }
 
-static void __exit cleanup_cciss_module(void);
-
 static void
 cciss_unmap_one(struct pci_dev *pdev,
 		CommandList_struct *cp,
@@ -1114,7 +1110,7 @@
 }
 
 
-int
+static int
 cciss_scsi_proc_info(struct Scsi_Host *sh,
 		char *buffer, /* data buffer */
 		char **start, 	   /* where data in buffer starts */
@@ -1149,29 +1145,6 @@
 			buffer, length);	
 } 
 
-/* this is via the generic proc support */
-const char *
-cciss_scsi_info(struct Scsi_Host *sa)
-{
-	static char buf[300];
-	ctlr_info_t *ci;
-
-	/* probably need to work on putting a bit more info in here... */
-	/* this is output via the /proc filesystem. */
-
-	ci = (ctlr_info_t *) sa->hostdata[0];
-
-	sprintf(buf, "%s %c%c%c%c\n",
-		ci->product_name, 
-		ci->firm_ver[0],
-		ci->firm_ver[1],
-		ci->firm_ver[2],
-		ci->firm_ver[3]);
-
-	return buf; 
-}
-
-
 /* cciss_scatter_gather takes a struct scsi_cmnd, (cmd), and does the pci 
    dma mapping  and fills in the scatter gather entries of the 
    cciss command, cp. */
@@ -1225,7 +1198,7 @@
 }
 
 
-int 
+static int 
 cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *))
 {
 	ctlr_info_t **c;
drivers/block/cciss_scsi.h renamed from drivers/block/cciss_scsi.h.old +0 -1
@@ -39,7 +39,6 @@
 #define SCSI_CCISS_CAN_QUEUE 2
 
 /* 
-	info:           	cciss_scsi_info,		\
 
 Note, cmd_per_lun could give us some trouble, so I'm setting it very low.
 Likewise, SCSI_CCISS_CAN_QUEUE is set very conservatively.
#6 lore raw

PATCH 1/1 drivers/block/cpqarray.c: small cleanups

In reply to Christoph Hellwig

The patch below contains the following cleanups:
- make cpqarray_pci_device_id static
- merge cpqarray_init_step2 into cpqarray_init and make it static

 drivers/block/cpqarray.c |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)
drivers/block/cpqarray.c renamed from drivers/block/cpqarray.c.old +2 -11
@@ -97,7 +97,7 @@
 };
 
 /* define the PCI info for the PCI cards this driver can control */
-const struct pci_device_id cpqarray_pci_device_id[] =
+static const struct pci_device_id cpqarray_pci_device_id[] =
 {
 	{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_COMPAQ_42XX,
 		0x0E11, 0x4058, 0, 0, 0},       /* SA431 */
@@ -135,7 +135,6 @@
 /* Debug Extra Paranoid... */
 #define DBGPX(s) do { } while(0)
 
-int cpqarray_init_step2(void);
 static int cpqarray_pci_init(ctlr_info_t *c, struct pci_dev *pdev);
 static void __iomem *remap_pci_mem(ulong base, ulong size);
 static int cpqarray_eisa_detect(void);
@@ -312,14 +311,6 @@
 
 module_param_array(eisa, int, NULL, 0);
 
-/* This is a bit of a hack,
- * necessary to support both eisa and pci
- */
-int __init cpqarray_init(void)
-{
-	return (cpqarray_init_step2());
-}
-
 static void release_io_mem(ctlr_info_t *c)
 {
 	/* if IO mem was not protected do nothing */
@@ -560,7 +551,7 @@
  *  This is it.  Find all the controllers and register them.
  *  returns the number of block devices registered.
  */
-int __init cpqarray_init_step2(void)
+static int __init cpqarray_init(void)
 {
 	int num_cntlrs_reg = 0;
 	int i;
#7 lore raw

PATCH 1/1 drivers/block/elevator.c: make two functions static

In reply to Christoph Hellwig

The patch below makes two needlessly global functions static.

diffstat output:

 drivers/block/elevator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/elevator.c renamed from drivers/block/elevator.c.old +2 -2
@@ -92,7 +92,7 @@
 }
 EXPORT_SYMBOL(elv_try_last_merge);
 
-struct elevator_type *elevator_find(const char *name)
+static struct elevator_type *elevator_find(const char *name)
 {
 	struct elevator_type *e = NULL;
 	struct list_head *entry;
@@ -222,7 +222,7 @@
 	kfree(e);
 }
 
-int elevator_global_init(void)
+static int elevator_global_init(void)
 {
 	return 0;
 }
Acked-by on v1 1/1
#8 lore raw

Re: [2.6 patch] drivers/block/elevator.c: make two functions static

Quoted 9 lines · Adrian Bunk

The patch below makes two needlessly global functions static.

diffstat output:

 drivers/block/elevator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Quoted 22 lines
drivers/block/elevator.c renamed from drivers/block/elevator.c.old +2 -2
@@ -92,7 +92,7 @@
 }
 EXPORT_SYMBOL(elv_try_last_merge);
 
-struct elevator_type *elevator_find(const char *name)
+static struct elevator_type *elevator_find(const char *name)
 {
 	struct elevator_type *e = NULL;
 	struct list_head *entry;
@@ -222,7 +222,7 @@
 	kfree(e);
 }
 
-int elevator_global_init(void)
+static int elevator_global_init(void)
 {
 	return 0;
 }
Signature · 1 line
Jens Axboe
#9 lore raw

PATCH 1/1 floppy.c: make some code static

In reply to Christoph Hellwig

The patch below makes some needlessly global code static.

diffstat output:

 drivers/block/floppy.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/floppy.c renamed from drivers/block/floppy.c.old +2 -2
@@ -4397,7 +4397,7 @@
 }
 #endif
 
-int __init floppy_init(void)
+static int __init floppy_init(void)
 {
 	int i, unit, drive;
 	int err, dr;
@@ -4738,7 +4738,7 @@
 
 #ifdef MODULE
 
-char *floppy;
+static char *floppy;
 
 static void unregister_devfs_entries(int drive)
 {
#10 lore raw

PATCH 1/1 loop.c: make two functions static

In reply to Christoph Hellwig

The patch below makes two needlessly global functions static.

diffstat output:

 drivers/block/loop.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/loop.c renamed from drivers/block/loop.c.old +2 -2
@@ -1114,7 +1114,7 @@
 EXPORT_SYMBOL(loop_register_transfer);
 EXPORT_SYMBOL(loop_unregister_transfer);
 
-int __init loop_init(void)
+static int __init loop_init(void)
 {
 	int	i;
 
@@ -1189,7 +1189,7 @@
 	return -ENOMEM;
 }
 
-void loop_exit(void)
+static void loop_exit(void)
 {
 	int i;
 
#11 lore raw

PATCH 1/1 drivers/block/nbd.c: make some functions static

In reply to Christoph Hellwig

The patch below makes three needlessly global functions static.

diffstat output:

 drivers/block/nbd.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/block/nbd.c renamed from drivers/block/nbd.c.old +3 -3
@@ -315,7 +315,7 @@
 }
 
 /* NULL returned = something went wrong, inform userspace */
-struct request *nbd_read_stat(struct nbd_device *lo)
+static struct request *nbd_read_stat(struct nbd_device *lo)
 {
 	int result;
 	struct nbd_reply reply;
@@ -377,7 +377,7 @@
 	return NULL;
 }
 
-void nbd_do_it(struct nbd_device *lo)
+static void nbd_do_it(struct nbd_device *lo)
 {
 	struct request *req;
 
@@ -388,7 +388,7 @@
 	return;
 }
 
-void nbd_clear_que(struct nbd_device *lo)
+static void nbd_clear_que(struct nbd_device *lo)
 {
 	struct request *req;
 
#12 lore raw

PATCH 1/1 noop-iosched.c: make some functions static

In reply to Christoph Hellwig

The patch below makes some needlessly global functions static.

diffstat output:

 drivers/block/noop-iosched.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/block/noop-iosched.c renamed from drivers/block/noop-iosched.c.old +6 -6
@@ -17,7 +17,7 @@
 /*
  * See if we can find a request that this buffer can be coalesced with.
  */
-int elevator_noop_merge(request_queue_t *q, struct request **req,
+static int elevator_noop_merge(request_queue_t *q, struct request **req,
 			struct bio *bio)
 {
 	struct list_head *entry = &q->queue_head;
@@ -50,13 +50,13 @@
 	return ELEVATOR_NO_MERGE;
 }
 
-void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
+static void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
 				  struct request *next)
 {
 	list_del_init(&next->queuelist);
 }
 
-void elevator_noop_add_request(request_queue_t *q, struct request *rq,
+static void elevator_noop_add_request(request_queue_t *q, struct request *rq,
 			       int where)
 {
 	struct list_head *insert = q->queue_head.prev;
@@ -75,7 +75,7 @@
 		q->last_merge = rq;
 }
 
-struct request *elevator_noop_next_request(request_queue_t *q)
+static struct request *elevator_noop_next_request(request_queue_t *q)
 {
 	if (!list_empty(&q->queue_head))
 		return list_entry_rq(q->queue_head.next);
@@ -94,12 +94,12 @@
 	.elevator_owner = THIS_MODULE,
 };
 
-int noop_init(void)
+static int noop_init(void)
 {
 	return elv_register(&elevator_noop);
 }
 
-void noop_exit(void)
+static void noop_exit(void)
 {
 	elv_unregister(&elevator_noop);
 }
Acked-by on v1 1/1
#13 lore raw

Re: [2.6 patch] noop-iosched.c: make some functions static

Quoted 9 lines · Adrian Bunk

The patch below makes some needlessly global functions static.

diffstat output:

 drivers/block/noop-iosched.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
Quoted 53 lines
drivers/block/noop-iosched.c renamed from drivers/block/noop-iosched.c.old +6 -6
@@ -17,7 +17,7 @@
 /*
  * See if we can find a request that this buffer can be coalesced with.
  */
-int elevator_noop_merge(request_queue_t *q, struct request **req,
+static int elevator_noop_merge(request_queue_t *q, struct request **req,
 			struct bio *bio)
 {
 	struct list_head *entry = &q->queue_head;
@@ -50,13 +50,13 @@
 	return ELEVATOR_NO_MERGE;
 }
 
-void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
+static void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
 				  struct request *next)
 {
 	list_del_init(&next->queuelist);
 }
 
-void elevator_noop_add_request(request_queue_t *q, struct request *rq,
+static void elevator_noop_add_request(request_queue_t *q, struct request *rq,
 			       int where)
 {
 	struct list_head *insert = q->queue_head.prev;
@@ -75,7 +75,7 @@
 		q->last_merge = rq;
 }
 
-struct request *elevator_noop_next_request(request_queue_t *q)
+static struct request *elevator_noop_next_request(request_queue_t *q)
 {
 	if (!list_empty(&q->queue_head))
 		return list_entry_rq(q->queue_head.next);
@@ -94,12 +94,12 @@
 	.elevator_owner = THIS_MODULE,
 };
 
-int noop_init(void)
+static int noop_init(void)
 {
 	return elv_register(&elevator_noop);
 }
 
-void noop_exit(void)
+static void noop_exit(void)
 {
 	elv_unregister(&elevator_noop);
 }
Signature · 1 line
Jens Axboe
#14 lore raw

PATCH 1/1 drivers/block/pktcdvd.c: make two functions static

In reply to Christoph Hellwig

The patch below makes two needlessly global functions static.

diffstat output:

 drivers/block/pktcdvd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/pktcdvd.c renamed from drivers/block/pktcdvd.c.old +2 -2
@@ -2627,7 +2627,7 @@
 	.fops  		= &pkt_ctl_fops
 };
 
-int pkt_init(void)
+static int pkt_init(void)
 {
 	int ret;
 
@@ -2663,7 +2663,7 @@
 	return ret;
 }
 
-void pkt_exit(void)
+static void pkt_exit(void)
 {
 	remove_proc_entry("pktcdvd", proc_root_driver);
 	misc_deregister(&pkt_misc);
#15 lore raw

Re: [2.6 patch] drivers/block/pktcdvd.c: make two functions static

Quoted 1 line · Adrian Bunk

The patch below makes two needlessly global functions static.

Looks good to me.

Quoted 27 lines

diffstat output:

 drivers/block/pktcdvd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/pktcdvd.c renamed from drivers/block/pktcdvd.c.old +2 -2
@@ -2627,7 +2627,7 @@
 	.fops  		= &pkt_ctl_fops
 };
 
-int pkt_init(void)
+static int pkt_init(void)
 {
 	int ret;
 
@@ -2663,7 +2663,7 @@
 	return ret;
 }
 
-void pkt_exit(void)
+static void pkt_exit(void)
 {
 	remove_proc_entry("pktcdvd", proc_root_driver);
 	misc_deregister(&pkt_misc);
Signature · 2 lines
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340
#16 lore raw

PATCH 1/1 drivers/block/ps2esdi.c: remove two unused functions

In reply to Christoph Hellwig

The patch below removes two unused global functions.

diffstat output:

 drivers/block/ps2esdi.c |   42 ----------------------------------------
 1 files changed, 42 deletions(-)
drivers/block/ps2esdi.c renamed from drivers/block/ps2esdi.c.old +0 -42
@@ -221,48 +221,6 @@
 }
 #endif /* MODULE */
 
-/* handles boot time command line parameters */
-void __init tp720_setup(char *str, int *ints)
-{
-	/* no params, just sets the tp720esdi flag if it exists */
-
-	printk("%s: TP 720 ESDI flag set\n", DEVICE_NAME);
-	tp720esdi = 1;
-}
-
-void __init ed_setup(char *str, int *ints)
-{
-	int hdind = 0;
-
-	/* handles 3 parameters only - corresponding to
-	   1. Number of cylinders
-	   2. Number of heads
-	   3. Sectors/track
-	 */
-
-	if (ints[0] != 3)
-		return;
-
-	/* print out the information - seen at boot time */
-	printk("%s: ints[0]=%d ints[1]=%d ints[2]=%d ints[3]=%d\n",
-	       DEVICE_NAME, ints[0], ints[1], ints[2], ints[3]);
-
-	/* set the index into device specific information table */
-	if (ps2esdi_info[0].head != 0)
-		hdind = 1;
-
-	/* set up all the device information */
-	ps2esdi_info[hdind].head = ints[2];
-	ps2esdi_info[hdind].sect = ints[3];
-	ps2esdi_info[hdind].cyl = ints[1];
-	ps2esdi_info[hdind].wpcom = 0;
-	ps2esdi_info[hdind].lzone = ints[1];
-	ps2esdi_info[hdind].ctl = (ints[2] > 8 ? 8 : 0);
-#if 0				/* this may be needed for PS2/Mod.80, but it hurts ThinkPad! */
-	ps2esdi_drives = hdind + 1;	/* increment index for the next time */
-#endif
-}				/* ed_setup */
-
 static int ps2esdi_getinfo(char *buf, int slot, void *d)
 {
 	int len = 0;
#17 lore raw

PATCH 1/1 drivers/block/rd.c: make two variables static

In reply to Christoph Hellwig

The patch below makes two needlessly global variables static.

diffstat output:

 drivers/block/rd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/rd.c renamed from drivers/block/rd.c.old +2 -2
@@ -77,7 +77,7 @@
  * architecture-specific setup routine (from the stored boot sector
  * information).
  */
-int rd_size = CONFIG_BLK_DEV_RAM_SIZE;		/* Size of the RAM disks */
+static int rd_size = CONFIG_BLK_DEV_RAM_SIZE;	/* Size of the RAM disks */
 /*
  * It would be very desirable to have a soft-blocksize (that in the case
  * of the ramdisk driver is also the hardblocksize ;) of PAGE_SIZE because
@@ -89,7 +89,7 @@
  * behaviour. The default is still BLOCK_SIZE (needed by rd_load_image that
  * supposes the filesystem in the image uses a BLOCK_SIZE blocksize).
  */
-int rd_blocksize = BLOCK_SIZE;			/* blocksize of the RAM disks */
+static int rd_blocksize = BLOCK_SIZE;		/* blocksize of the RAM disks */
 
 /*
  * Copyright (C) 2000 Linus Torvalds.
#18 lore raw

PATCH 1/1 drivers/block/ub.c: make a struct static

In reply to Christoph Hellwig

The patch below make a needlessly global struct static.

drivers/block/ub.c renamed from drivers/block/ub.c.old +1 -1
@@ -2097,7 +2097,7 @@
 	spin_unlock_irqrestore(&ub_lock, flags);
 }
 
-struct usb_driver ub_driver = {
+static struct usb_driver ub_driver = {
 	.owner =	THIS_MODULE,
 	.name =		"ub",
 	.probe =	ub_probe,
#19 lore raw

Re: [2.6 patch] drivers/block/ub.c: make a struct static

drivers/block/ub.c line 2101

Quoted 4 lines
drivers/block/ub.c renamed from drivers/block/ub.c.old +1 -1
-struct usb_driver ub_driver = {
+static struct usb_driver ub_driver = {
 	.owner =	THIS_MODULE,

I'm pretty sure it was in the Greg's tree for a while. I have it, too. Just waiting for a turnaround.

-- Pete

__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

#20 lore raw

Re: [2.6 patch] drivers/block/ub.c: make a struct static

Quoted 7 lines · Pete Zaitcev

drivers/block/ub.c line 2101

Quoted 4 lines
drivers/block/ub.c renamed from drivers/block/ub.c.old +1 -1
-struct usb_driver ub_driver = {
+static struct usb_driver ub_driver = {
 	.owner =	THIS_MODULE,

I'm pretty sure it was in the Greg's tree for a while. I have it, too. Just waiting for a turnaround.

It's still not present in 2.6.11-rc4-mm1.

Quoted 1 line

-- Pete

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
#21 lore raw

PATCH 1/1 drivers/block/umem.c: make two functions static

In reply to Christoph Hellwig

The patch below makes two needlessly global functions static.

diffstat output:

 drivers/block/umem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/umem.c renamed from drivers/block/umem.c.old +2 -2
@@ -1181,7 +1181,7 @@
 -----------------------------------------------------------------------------------
 */
 
-int __init mm_init(void)
+static int __init mm_init(void)
 {
 	int retval, i;
 	int err;
@@ -1232,7 +1232,7 @@
 --                             mm_cleanup
 -----------------------------------------------------------------------------------
 */
-void __exit mm_cleanup(void)
+static void __exit mm_cleanup(void)
 {
 	int i;
 
#22 lore raw

PATCH 1/1 drivers/block/xd.c: make a variable static

In reply to Christoph Hellwig

The patch below makes a needlessly global variable static.

drivers/block/xd.c renamed from drivers/block/xd.c.old +1 -1
@@ -67,7 +67,7 @@
 /* Above may need to be increased if a problem with the 2nd drive detection
    (ST11M controller) or resetting a controller (WD) appears */
 
-XD_INFO xd_info[XD_MAXDRIVES];
+static XD_INFO xd_info[XD_MAXDRIVES];
 
 /* If you try this driver and find that your card is not detected by the driver at bootup, you need to add your BIOS
    signature and details to the following list of signatures. A BIOS signature is a string embedded into the first