safexcel: Fix -Wunused-but-set-variable warnings
MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
517373f723
commit
60c95f3163
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user