From nobody Wed Nov 24 18:39:41 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 4884E189E429; Wed, 24 Nov 2021 18:39:43 +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 4HzqYT63brz3qrL; Wed, 24 Nov 2021 18:39:41 +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 186247084; Wed, 24 Nov 2021 18:39:41 +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 1AOIdfdZ095185; Wed, 24 Nov 2021 18:39:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIdfuQ095184; Wed, 24 Nov 2021 18:39:41 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:41 GMT Message-Id: <202111241839.1AOIdfuQ095184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 60c95f316374 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 60c95f316374fdd383f70b50e98ad097460accf3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779182; 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=lZv8yYL/9xh7dY9PVnKJ0NmCEm+QGy/VNc8yJEa0rqM=; b=XQI1Fj+MtR2Iyn7IXmK/ia926M9/a744zMo6ykjB3c4WAhj6Q1OoexBmY1WihtOXdUGTAz x6uIq9aFa9uokwhtznHBnHmmSm28S7VoiWzMwCfsypUNawrO5pDcVcbFxXpNgh1sfKCX2S MUzObSlqbTJcm9jZ05FNsajVeAGwsh8kQWUlXfNnrw0rVnTRhqNJQIoQFIAC/+3i/mIXWR ocGPTlwbPdMMhrofcHQVVC6uAzWwvXLkUOBWpanO1gTyv2K5zFipQT3RI/obYDqBIRfMPy xlzDTACNt/Y3kZCHzx/0LX9FT0IiBsOJRVZ5jRTjyBbXfh/+sgwvBDo/n4VYHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779182; a=rsa-sha256; cv=none; b=Zo3fskmOaxQg25IZ/7wYHtXzNVdj9UWTqRYlgj0fJfE4QVxrlmmd+P1UFLSWQSDOJoWIgD wL8Gir3zTmQvQbV1KS0FeQqt2ZF17ZmEEiZny0dXF/4J8fggqtOt0GSCL8HVElyjgqs0vL Ofg4MgWsAiV+FkzolSDkvZwiSIoOlVk1O24Dx30UgjywErCQBxzYSdBPVi0X8gZhfscz8t 32hFCHPeKakFirn3H+2ft9YgGJoDZBuCDj7tDbjrKBVIXdprGRH/+rJ9MXJLJzUDvkaecO +aY4v0npdfs3Cg7TNtleB76COZgVvoYZwQuf+m/Ix6Hsa9mKOUhJChtqM6dZ/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=60c95f316374fdd383f70b50e98ad097460accf3 commit 60c95f316374fdd383f70b50e98ad097460accf3 Author: Mark Johnston AuthorDate: 2021-11-24 18:30:39 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:16 +0000 safexcel: Fix -Wunused-but-set-variable warnings MFC after: 1 week Sponsored by: The FreeBSD Foundation --- 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 36bd65642403..dc43b7dfc026 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)) {