[2.6 patch] drivers/block/cciss*: misc cleanups

From: Adrian Bunk (bunk_at_stusta.de)
Date: 01/29/05

  • Next message: Christoph Hellwig: "Re: [Wbsd-devel] [PATCH 540] MMC_WBSD depends on ISA"
    Date:	Sat, 29 Jan 2005 14:38:25 +0100
    To: mike.miller@hp.com
    
    

    This patch contains the following cleanups:
    - make some needlesly global code static
    - cciss_scsi.c: remove the unused global function cciss_scsi_info
    - cciss.c:
      - init_cciss_module -> cciss_init
      - cleanup_cciss_module -> cciss_cleanup

    Signed-off-by: Adrian Bunk <bunk@stusta.de>

    ---
     drivers/block/cciss.c      |   15 +++++----------
     drivers/block/cciss_scsi.c |   35 ++++-------------------------------
     drivers/block/cciss_scsi.h |    1 -
     3 files changed, 9 insertions(+), 42 deletions(-)
    --- linux-2.6.11-rc2-mm1-full/drivers/block/cciss_scsi.h.old	2005-01-29 13:50:28.000000000 +0100
    +++ linux-2.6.11-rc2-mm1-full/drivers/block/cciss_scsi.h	2005-01-29 13:51:05.000000000 +0100
    @@ -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.
    --- linux-2.6.11-rc2-mm1-full/drivers/block/cciss_scsi.c.old	2005-01-29 13:50:40.000000000 +0100
    +++ linux-2.6.11-rc2-mm1-full/drivers/block/cciss_scsi.c	2005-01-29 13:51:05.000000000 +0100
    @@ -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;
    --- linux-2.6.11-rc2-mm1-full/drivers/block/cciss.c.old	2005-01-29 13:50:55.000000000 +0100
    +++ linux-2.6.11-rc2-mm1-full/drivers/block/cciss.c	2005-01-29 14:25:31.000000000 +0100
    @@ -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,
    @@ -2878,7 +2878,7 @@
      *  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 cciss_init(void)
     {
     	printk(KERN_INFO DRIVER_NAME "\n");
     
    @@ -2886,12 +2886,7 @@
     	return pci_module_init(&cciss_pci_driver);
     }
     
    -static int __init init_cciss_module(void)
    -{
    -	return ( cciss_init());
    -}
    -
    -static void __exit cleanup_cciss_module(void)
    +static void __exit cciss_cleanup(void)
     {
     	int i;
     
    @@ -2909,5 +2904,5 @@
     	remove_proc_entry("cciss", proc_root_driver);
     }
     
    -module_init(init_cciss_module);
    -module_exit(cleanup_cciss_module);
    +module_init(cciss_init);
    +module_exit(cciss_cleanup);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Christoph Hellwig: "Re: [Wbsd-devel] [PATCH 540] MMC_WBSD depends on ISA"

    Relevant Pages

    • [2.6 patch] drivers/block/cciss*: misc cleanups
      ... make some needlesly global code static ... +static int cciss_scsi_proc_info( ... char *buffer, /* data buffer */ ... +static void __exit cciss_cleanup ...
      (Linux-Kernel)
    • [PATCH/RFC] exposing ACPI objects in sysfs
      ... +struct acpi_bin_files { ... * be pointing further down in the buffer, ...
      (Linux-Kernel)
    • [PATCH 1/3] s390: dasd extended error reporting module.
      ... The DASD extended error reporting is a facility that allows to ... get detailed information about certain problems in the DASD I/O. ... static int __init ... * The internal buffer is meant to store obaque blobs of data, ...
      (Linux-Kernel)
    • [git patches] new wireless stuffs
      ... patch with a Linksys WPC11v3. ... All this new wireless code adds near-infinite amounts of trailing whitespace. ... static void timer_func; ... static int takedown_proc_entry(struct net_device *dev, ...
      (Linux-Kernel)
    • [patch 3/3] s390: dasd extended error reporting module.
      ... The DASD extended error reporting is a facility that allows to ... get detailed information about certain problems in the DASD I/O. ... static int __init ... + * The internal buffer is meant to store obaque blobs of data, ...
      (Linux-Kernel)