git: aa5664c0f53b - stable/13 - safexcel: Fix -Wunused-but-set-variable warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Dec 2021 12:48:31 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aa5664c0f53b60915ad1400c4614af9b248223ab commit aa5664c0f53b60915ad1400c4614af9b248223ab Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-11-24 18:30:39 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-12-01 12:40:49 +0000 safexcel: Fix -Wunused-but-set-variable warnings Sponsored by: The FreeBSD Foundation (cherry picked from commit 60c95f316374fdd383f70b50e98ad097460accf3) --- sys/dev/safexcel/safexcel.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/dev/safexcel/safexcel.c b/sys/dev/safexcel/safexcel.c index 6095787330c1..242f1bcfb90a 100644 --- a/sys/dev/safexcel/safexcel.c +++ b/sys/dev/safexcel/safexcel.c @@ -168,7 +168,7 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) struct safexcel_res_descr *rdesc; struct safexcel_request *req; struct safexcel_ring *ring; - uint32_t blocked, error, i, ncdescs, nrdescs, nreqs; + uint32_t blocked, error, i, nrdescs, nreqs; blocked = 0; ring = &sc->sc_ring[ringidx]; @@ -194,7 +194,7 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) bus_dmamap_sync(ring->dma_atok.tag, ring->dma_atok.map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - ncdescs = nrdescs = 0; + nrdescs = 0; for (i = 0; i < nreqs; i++) { req = safexcel_next_request(ring); @@ -203,7 +203,6 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) bus_dmamap_sync(ring->data_dtag, req->dmap, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - ncdescs += req->cdescs; while (req->cdescs-- > 0) { cdesc = safexcel_cmd_descr_next(&ring->cdr); KASSERT(cdesc != NULL, @@ -306,7 +305,6 @@ static int safexcel_configure(struct safexcel_softc *sc) { uint32_t i, mask, pemask, reg; - device_t dev; if (sc->sc_type == 197) { sc->sc_offsets = eip197_regs_offset; @@ -316,8 +314,6 @@ safexcel_configure(struct safexcel_softc *sc) pemask = EIP97_N_PES_MASK; } - dev = sc->sc_dev; - /* Scan for valid ring interrupt controllers. */ for (i = 0; i < SAFEXCEL_MAX_RING_AIC; i++) { reg = SAFEXCEL_READ(sc, SAFEXCEL_HIA_AIC_R(sc) + @@ -1625,12 +1621,10 @@ static void safexcel_instr_eta(struct safexcel_request *req, struct safexcel_instr *instr, struct safexcel_cmd_descr *cdesc) { - const struct crypto_session_params *csp; struct cryptop *crp; struct safexcel_instr *start; crp = req->crp; - csp = crypto_get_params(crp->crp_session); start = instr; /* Insert the AAD. */ @@ -2452,9 +2446,7 @@ safexcel_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) { struct safexcel_session *sess; - struct safexcel_softc *sc; - sc = device_get_softc(dev); sess = crypto_get_driver_session(cses); sess->cses = cses; @@ -2533,7 +2525,6 @@ safexcel_newsession(device_t dev, crypto_session_t cses, static int safexcel_process(device_t dev, struct cryptop *crp, int hint) { - const struct crypto_session_params *csp; struct safexcel_request *req; struct safexcel_ring *ring; struct safexcel_session *sess; @@ -2542,7 +2533,6 @@ safexcel_process(device_t dev, struct cryptop *crp, int hint) sc = device_get_softc(dev); sess = crypto_get_driver_session(crp->crp_session); - csp = crypto_get_params(crp->crp_session); if (__predict_false(crypto_buffer_len(&crp->crp_buf) > SAFEXCEL_MAX_REQUEST_SIZE)) {