aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-09-22 17:56:45 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-23 12:42:13 -0400
commit678e80a32fcce02323bbd753ed8944ea92d0a2d5 (patch)
treea42f27d47157b80311e05a381bb2a1994cdcb382 /drivers/scsi
parent060ae855a836d3ed3359faa13874e92caaa34763 (diff)
[SCSI] aic79xx: fix shadowed variables, add statics
Redeclared within different if/else blocks, safe to reuse the original from beginning of function. drivers/scsi/aic7xxx/aic79xx_core.c:2475:10: warning: symbol 'scbid' shadows an earlier one drivers/scsi/aic7xxx/aic79xx_core.c:2399:10: originally declared here drivers/scsi/aic7xxx/aic79xx_core.c:2586:10: warning: symbol 'scbid' shadows an earlier one drivers/scsi/aic7xxx/aic79xx_core.c:2399:10: originally declared here drivers/scsi/aic7xxx/aic79xx_core.c:2587:15: warning: symbol 'scb' shadows an earlier one drivers/scsi/aic7xxx/aic79xx_core.c:2393:13: originally declared here Use caminfo for the outer declaration, the redeclared version is iterating over all initiator/target pairs (devices) which. drivers/scsi/aic7xxx/aic79xx_core.c:8857:23: warning: symbol 'devinfo' shadows an earlier one drivers/scsi/aic7xxx/aic79xx_core.c:8711:21: originally declared here Forward declaration was already marked static, make the definition match. drivers/scsi/aic7xxx/aic79xx_core.c:3693:1: warning: symbol 'ahd_devlimited_syncrate' was not declared. Should it be static? Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_core.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index 55508b0fcec4..99048d369139 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -2472,8 +2472,6 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat)
2472 if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0) 2472 if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0)
2473 ahd_outb(ahd, CLRLQOINT1, 0); 2473 ahd_outb(ahd, CLRLQOINT1, 0);
2474 } else if ((status & SELTO) != 0) { 2474 } else if ((status & SELTO) != 0) {
2475 u_int scbid;
2476
2477 /* Stop the selection */ 2475 /* Stop the selection */
2478 ahd_outb(ahd, SCSISEQ0, 0); 2476 ahd_outb(ahd, SCSISEQ0, 0);
2479 2477
@@ -2583,9 +2581,6 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat)
2583 case BUSFREE_DFF0: 2581 case BUSFREE_DFF0:
2584 case BUSFREE_DFF1: 2582 case BUSFREE_DFF1:
2585 { 2583 {
2586 u_int scbid;
2587 struct scb *scb;
2588
2589 mode = busfreetime == BUSFREE_DFF0 2584 mode = busfreetime == BUSFREE_DFF0
2590 ? AHD_MODE_DFF0 : AHD_MODE_DFF1; 2585 ? AHD_MODE_DFF0 : AHD_MODE_DFF1;
2591 ahd_set_modes(ahd, mode, mode); 2586 ahd_set_modes(ahd, mode, mode);
@@ -3689,7 +3684,7 @@ ahd_free_tstate(struct ahd_softc *ahd, u_int scsi_id, char channel, int force)
3689 * by the capabilities of the bus connectivity of and sync settings for 3684 * by the capabilities of the bus connectivity of and sync settings for
3690 * the target. 3685 * the target.
3691 */ 3686 */
3692void 3687static void
3693ahd_devlimited_syncrate(struct ahd_softc *ahd, 3688ahd_devlimited_syncrate(struct ahd_softc *ahd,
3694 struct ahd_initiator_tinfo *tinfo, 3689 struct ahd_initiator_tinfo *tinfo,
3695 u_int *period, u_int *ppr_options, role_t role) 3690 u_int *period, u_int *ppr_options, role_t role)
@@ -8708,7 +8703,7 @@ ahd_reset_current_bus(struct ahd_softc *ahd)
8708int 8703int
8709ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset) 8704ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
8710{ 8705{
8711 struct ahd_devinfo devinfo; 8706 struct ahd_devinfo caminfo;
8712 u_int initiator; 8707 u_int initiator;
8713 u_int target; 8708 u_int target;
8714 u_int max_scsiid; 8709 u_int max_scsiid;
@@ -8729,7 +8724,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
8729 8724
8730 ahd->pending_device = NULL; 8725 ahd->pending_device = NULL;
8731 8726
8732 ahd_compile_devinfo(&devinfo, 8727 ahd_compile_devinfo(&caminfo,
8733 CAM_TARGET_WILDCARD, 8728 CAM_TARGET_WILDCARD,
8734 CAM_TARGET_WILDCARD, 8729 CAM_TARGET_WILDCARD,
8735 CAM_LUN_WILDCARD, 8730 CAM_LUN_WILDCARD,
@@ -8868,7 +8863,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
8868 } 8863 }
8869 8864
8870 /* Notify the XPT that a bus reset occurred */ 8865 /* Notify the XPT that a bus reset occurred */
8871 ahd_send_async(ahd, devinfo.channel, CAM_TARGET_WILDCARD, 8866 ahd_send_async(ahd, caminfo.channel, CAM_TARGET_WILDCARD,
8872 CAM_LUN_WILDCARD, AC_BUS_RESET); 8867 CAM_LUN_WILDCARD, AC_BUS_RESET);
8873 8868
8874 ahd_restart(ahd); 8869 ahd_restart(ahd);