From nobody Wed Dec 01 12:48:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D4B3518BA2CB; Wed, 1 Dec 2021 12:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3zR34GByz3jsY; Wed, 1 Dec 2021 12:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 720781CC9; Wed, 1 Dec 2021 12:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B1CmVW7065809; Wed, 1 Dec 2021 12:48:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1CmVJU065808; Wed, 1 Dec 2021 12:48:31 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:31 GMT Message-Id: <202112011248.1B1CmVJU065808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: aa5664c0f53b - stable/13 - safexcel: Fix -Wunused-but-set-variable warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aa5664c0f53b60915ad1400c4614af9b248223ab Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HuRLUjfs/iv4S2tIkYyYO/OVlnzih9Ki+UFmcAgZZMs=; b=M2OlnSwrA7+uLI0h+0Z+Nh6QMsiAfwYG76QcpIpCL4GKIqfRpyc6SnqDs2XIhlJSh4v8Tz WNmRg4Z5F6VgdDb/H31ZDrCTeN99wwO9Fo41e2xXh4qXVHo0WbKNQQZQ2gNjIMCs8+JnOx qTxjNluK0LykHOyjioW0yt0e91wNGYIO6ULoajsm/R/MNnMXcutNt5ZSkw8TBxPlola0Zb p1LQI5TuA7DqoOcYv2h8K37ls7wc7FScv3XdiFpc6Gl5AoLbGN2QFjZHpsGs7NW/XVVQ37 IgjudwLNFIkD2jkJAvdyj1P6bNIMVSTKv2csTvU8mG7PXJFxfEMscggpIqZBAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362911; a=rsa-sha256; cv=none; b=h8m1ffavskJUNX2CIvTzHiJ4J5V3SZXjWMF2MbarkLTfjwKV4j+IW4zQGT30TEyRtLy8d4 8e1q+vmryf1NlLYrsEFzwsIjrLnVfuHESEfIQLhD4dgSwkN+5UzXaGepiWc+dSsipaGDlc UO5hDOsJamc7P5AYaUZlmPkuUQ9yklMMrwnAMVYNFYCADtqxEFVkqF5ieTUdGc5hRFVstV LJ6YhfCDZa5RtWge3xf6VXJEx0NZCzQvHrhfv5DxGIpmZlik433olRPR643UR/eBWsdQKY OAC8Ue8GaWCMOlnZhMRWG4JTQV/2Pm597s7WCnFA13EyDia1Q1xVqJSxGbLeRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aa5664c0f53b60915ad1400c4614af9b248223ab commit aa5664c0f53b60915ad1400c4614af9b248223ab Author: Mark Johnston AuthorDate: 2021-11-24 18:30:39 +0000 Commit: Mark Johnston 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)) {