]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
Fix "set but not used" in aic7xxx/aic79xx. The variables were dead
authorScott Long <scottl@FreeBSD.org>
Sat, 26 Feb 2022 17:33:31 +0000 (10:33 -0700)
committerScott Long <scottl@FreeBSD.org>
Sat, 26 Feb 2022 17:33:31 +0000 (10:33 -0700)
code.

sys/dev/aic7xxx/aic79xx.c
sys/dev/aic7xxx/aic7xxx.c

index db4f39d39e5ec95619f1e1c66e217aad5d686c57..c48b5301f12a5f66ba7c05738a6af04c6a962503 100644 (file)
@@ -4887,7 +4887,6 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
                         */
                } else {
                        uint32_t data_cnt;
-                       uint64_t data_addr;
                        uint32_t sglen;
 
                        /* Pull in the rest of the sgptr */
@@ -4901,9 +4900,7 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
                                 */
                                data_cnt &= ~AHD_SG_LEN_MASK;
                        }
-                       data_addr = ahd_inq(ahd, SHADDR);
                        data_cnt += 1;
-                       data_addr -= 1;
                        sgptr &= SG_PTR_MASK;
                        if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
                                struct ahd_dma64_seg *sg;
@@ -4925,9 +4922,6 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
                                         * bits while setting the count to 1.
                                         */
                                        data_cnt = 1|(sglen&(~AHD_SG_LEN_MASK));
-                                       data_addr = aic_le64toh(sg->addr)
-                                                 + (sglen & AHD_SG_LEN_MASK)
-                                                 - 1;
 
                                        /*
                                         * Increment sg so it points to the
@@ -4957,9 +4951,6 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
                                         * bits while setting the count to 1.
                                         */
                                        data_cnt = 1|(sglen&(~AHD_SG_LEN_MASK));
-                                       data_addr = aic_le32toh(sg->addr)
-                                                 + (sglen & AHD_SG_LEN_MASK)
-                                                 - 1;
 
                                        /*
                                         * Increment sg so it points to the
index 247507d80f7fe42b6ad050b86571b078f8c37661..d76d17b4eac2b31702682eb77fd5980c61148798 100644 (file)
@@ -3674,7 +3674,6 @@ ahc_handle_ign_wide_residue(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
                } else {
                        struct ahc_dma_seg *sg;
                        uint32_t data_cnt;
-                       uint32_t data_addr;
                        uint32_t sglen;
 
                        /* Pull in all of the sgptr */
@@ -3690,10 +3689,7 @@ ahc_handle_ign_wide_residue(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
                                data_cnt &= ~AHC_SG_LEN_MASK;
                        }
 
-                       data_addr = ahc_inl(ahc, SHADDR);
-
                        data_cnt += 1;
-                       data_addr -= 1;
                        sgptr &= SG_PTR_MASK;
 
                        sg = ahc_sg_bus_to_virt(scb, sgptr);
@@ -3713,8 +3709,6 @@ ahc_handle_ign_wide_residue(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
                                 * while setting the count to 1.
                                 */
                                data_cnt = 1 | (sglen & (~AHC_SG_LEN_MASK));
-                               data_addr = aic_le32toh(sg->addr)
-                                         + (sglen & AHC_SG_LEN_MASK) - 1;
 
                                /*
                                 * Increment sg so it points to the