[2.6 patch] SCSI sym53c8xx_2: make some code static

From: Adrian Bunk
Date: Sun Nov 14 2004 - 22:27:21 EST


The patch below makes some needlessly global code static.


diffstat output:
drivers/scsi/sym53c8xx_2/sym_glue.c | 6 +++---
drivers/scsi/sym53c8xx_2/sym_glue.h | 1 -
drivers/scsi/sym53c8xx_2/sym_hipd.c | 3 ++-
drivers/scsi/sym53c8xx_2/sym_hipd.h | 1 -
4 files changed, 5 insertions(+), 6 deletions(-)


Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

--- linux-2.6.10-rc1-mm5-full/drivers/scsi/sym53c8xx_2/sym_glue.h.old 2004-11-14 01:33:22.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/sym53c8xx_2/sym_glue.h 2004-11-14 01:33:29.000000000 +0100
@@ -550,7 +550,6 @@
#define sym_cam_target_lun(ccb) (ccb)->lun
#define sym_freeze_cam_ccb(ccb) do { ; } while (0)
void sym_xpt_done(hcb_p np, cam_ccb_p ccb);
-void sym_xpt_done2(hcb_p np, cam_ccb_p ccb, int cam_status);
void sym_print_addr (ccb_p cp);
void sym_xpt_async_bus_reset(hcb_p np);
void sym_xpt_async_sent_bdr(hcb_p np, int target);
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/sym53c8xx_2/sym_glue.c.old 2004-11-14 01:32:27.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/sym53c8xx_2/sym_glue.c 2004-11-14 01:33:10.000000000 +0100
@@ -147,7 +147,7 @@
}

/* This lock protects only the memory allocation/free. */
-spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;

static struct scsi_transport_template *sym2_transport_template = NULL;

@@ -285,7 +285,7 @@
ccb->scsi_done(ccb);
}

-void sym_xpt_done2(struct sym_hcb *np, struct scsi_cmnd *ccb, int cam_status)
+static void sym_xpt_done2(struct sym_hcb *np, struct scsi_cmnd *ccb, int cam_status)
{
sym_set_cam_status(ccb, cam_status);
sym_xpt_done(np, ccb);
@@ -2010,7 +2010,7 @@
* the preset SCSI ID (which may be zero) must be read in from
* a special configuration space register of the 875.
*/
-void sym_config_pqs(struct pci_dev *pdev, struct sym_device *sym_dev)
+static void sym_config_pqs(struct pci_dev *pdev, struct sym_device *sym_dev)
{
int slot;
u8 tmp;
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/sym53c8xx_2/sym_hipd.h.old 2004-11-14 01:34:13.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/sym53c8xx_2/sym_hipd.h 2004-11-14 01:34:24.000000000 +0100
@@ -1098,7 +1098,6 @@
#endif
void sym_start_up (hcb_p np, int reason);
void sym_interrupt (hcb_p np);
-void sym_flush_comp_queue(hcb_p np, int cam_status);
int sym_clear_tasks(hcb_p np, int cam_status, int target, int lun, int task);
ccb_p sym_get_ccb (hcb_p np, u_char tn, u_char ln, u_char tag_order);
void sym_free_ccb (hcb_p np, ccb_p cp);
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/sym53c8xx_2/sym_hipd.c.old 2004-11-14 01:34:32.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/sym53c8xx_2/sym_hipd.c 2004-11-14 01:34:58.000000000 +0100
@@ -55,6 +55,7 @@
static void sym_complete_error (hcb_p np, ccb_p cp);
static void sym_complete_ok (hcb_p np, ccb_p cp);
static int sym_compute_residual(hcb_p np, ccb_p cp);
+static void sym_flush_comp_queue(hcb_p np, int cam_status);

/*
* Returns the name of this driver.
@@ -3038,7 +3039,7 @@
* This function is called when all CCBs involved
* in error handling/recovery have been reaped.
*/
-void sym_flush_comp_queue(hcb_p np, int cam_status)
+static void sym_flush_comp_queue(hcb_p np, int cam_status)
{
SYM_QUEHEAD *qp;
ccb_p cp;

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