Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/aic7xxx/aic79xx_core.c: In function ahd_dump_sglist: drivers/scsi/aic7xxx/aic79xx_core.c:1738:14: warning: variable len set but not used [-Wunused-but-set-variable] drivers/scsi/aic7xxx/aic79xx_core.c: In function ahd_handle_seqint: drivers/scsi/aic7xxx/aic79xx_core.c:1911:26: warning: variable tinfo set but not used [-Wunused-but-set-variable] drivers/scsi/aic7xxx/aic79xx_core.c: In function ahd_handle_transmission_error: drivers/scsi/aic7xxx/aic79xx_core.c:2672:8: warning: variable lqistat2 set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Signed-off-by: zhengbin <zhengbin13@xxxxxxxxxx> --- drivers/scsi/aic7xxx/aic79xx_core.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 7e5044b..75d94d6 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c @@ -1743,8 +1743,8 @@ ahd_dump_sglist(struct scb *scb) i, (uint32_t)((addr >> 32) & 0xFFFFFFFF), (uint32_t)(addr & 0xFFFFFFFF), - sg_list[i].len & AHD_SG_LEN_MASK, - (sg_list[i].len & AHD_DMA_LAST_SEG) + len & AHD_SG_LEN_MASK, + (len & AHD_DMA_LAST_SEG) ? " Last" : ""); } } else { @@ -1906,9 +1906,6 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) { struct ahd_devinfo devinfo; struct scb *scb; - struct ahd_initiator_tinfo *targ_info; - struct ahd_tmode_tstate *tstate; - struct ahd_transinfo *tinfo; u_int scbid; /* @@ -1936,12 +1933,6 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahd, scb), ROLE_INITIATOR); - targ_info = ahd_fetch_transinfo(ahd, - devinfo.channel, - devinfo.our_scsiid, - devinfo.target, - &tstate); - tinfo = &targ_info->curr; ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, AHD_TRANS_ACTIVE, /*paused*/TRUE); ahd_set_syncrate(ahd, &devinfo, /*period*/0, @@ -2669,7 +2660,6 @@ ahd_handle_transmission_error(struct ahd_softc *ahd) struct scb *scb; u_int scbid; u_int lqistat1; - u_int lqistat2; u_int msg_out; u_int curphase; u_int lastphase; @@ -2680,7 +2670,6 @@ ahd_handle_transmission_error(struct ahd_softc *ahd) scb = NULL; ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); lqistat1 = ahd_inb(ahd, LQISTAT1) & ~(LQIPHASE_LQ|LQIPHASE_NLQ); - lqistat2 = ahd_inb(ahd, LQISTAT2); if ((lqistat1 & (LQICRCI_NLQ|LQICRCI_LQ)) == 0 && (ahd->bugs & AHD_NLQICRC_DELAYED_BUG) != 0) { u_int lqistate; -- 2.7.4