From nobody Mon Dec 27 00:15:38 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 A8E2F1908021; Mon, 27 Dec 2021 00:15:39 +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 4JMdVL3wYZz50T6; Mon, 27 Dec 2021 00:15:38 +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 57B24142C3; Mon, 27 Dec 2021 00:15:38 +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 1BR0FcEt016820; Mon, 27 Dec 2021 00:15:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BR0FcGk016819; Mon, 27 Dec 2021 00:15:38 GMT (envelope-from git) Date: Mon, 27 Dec 2021 00:15:38 GMT Message-Id: <202112270015.1BR0FcGk016819@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: 2520c9ba7e34 - stable/13 - qat: Address -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: 2520c9ba7e34abfc4717123b4f8d8d2460cd4df1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640564138; 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=btMoFJf/KZ8KJtplUTSAKZAsiJvnDLHeSfIEzP1z+aQ=; b=RwGvEOJt1s/fps/tE4zchN91vsgX+GWWENRF+ZTOD4l8Qs3/2l5ZrCmGveAtOfGnVllF7I 24hKm/f+BNHdTD82pZLQ6Y5St9keR/riDZFd7nG8cko4mSrFTrLr7bZrpxB4D0WkLtjv6W 72WvEh82tC7qBRIY/1lU1JuthiCtrFkY9KsT74FbplSp5AVTfiOJUhScDIyT9SJleMtGn8 wpQMYRKcm4L/SA9LU35Yyuo7KOhhug5E0AFt2wYBPiUnIMjHSSfFUioqVtH5VA2Tb12gan y7A/7hRq1GA54bon1R5iAtQh1oMXC4tRDFOZDTo/jdNNYOdYMmwhoAPQuuSPiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640564138; a=rsa-sha256; cv=none; b=W5c0dwLgWse2dsPsE4Z3ADws1ppiGH80W1sME1ytu9dOVssf3O3BpuyXuaMdWcY4HX/Rhm 8Pr6X/27rBENiUrcsCpcdnYEmNn1VxElE2DYlSEKdIUt3n8WF6jkci8cI/6gA5EY1ypPwD G0LNxoJgAeKcxErAJEUiOcVADhAb97fjBQUDg0Y1iOmm/Ne6ulNPb9QAlvoYcPIJcsuHYH Ob/fSVPK1gZqblpbrcFExMLLbJtuyWrWm4ux1o+jwjA6PtO+J4ZdcFujB3fMHW9vU0G+mH zZoExtO4JXpqK/KJqQZWk2v/RayEKU8dKWc9nDLt+qZz+Ca8ngskgcLCClX6Cw== 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=2520c9ba7e34abfc4717123b4f8d8d2460cd4df1 commit 2520c9ba7e34abfc4717123b4f8d8d2460cd4df1 Author: Mark Johnston AuthorDate: 2021-12-10 15:52:30 +0000 Commit: Mark Johnston CommitDate: 2021-12-27 00:15:14 +0000 qat: Address -Wunused-but-set-variable warnings (cherry picked from commit 8fcf230c1377c4598a7aa6560ec43ff46662fbaa) --- sys/dev/qat/qat.c | 17 +++-------------- sys/dev/qat/qat_ae.c | 10 +--------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/sys/dev/qat/qat.c b/sys/dev/qat/qat.c index 49cb408fd702..b5d3f4d9629a 100644 --- a/sys/dev/qat/qat.c +++ b/sys/dev/qat/qat.c @@ -352,8 +352,7 @@ qat_attach(device_t dev) { struct qat_softc *sc = device_get_softc(dev); const struct qat_product *qatp; - bus_size_t msixtbl_offset; - int bar, count, error, i, msixoff, msixtbl_bar; + int bar, count, error, i; sc->sc_dev = dev; sc->sc_rev = pci_get_revid(dev); @@ -390,16 +389,6 @@ qat_attach(device_t dev) sc->sc_accel_cap = sc->sc_hw.qhw_get_accel_cap(sc); sc->sc_fw_uof_name = sc->sc_hw.qhw_get_fw_uof_name(sc); - /* Map BARs */ - msixtbl_bar = 0; - msixtbl_offset = 0; - if (pci_find_cap(dev, PCIY_MSIX, &msixoff) == 0) { - uint32_t msixtbl; - msixtbl = pci_read_config(dev, msixoff + PCIR_MSIX_TABLE, 4); - msixtbl_offset = msixtbl & ~PCIM_MSIX_BIR_MASK; - msixtbl_bar = PCIR_BAR(msixtbl & PCIM_MSIX_BIR_MASK); - } - i = 0; if (sc->sc_hw.qhw_sram_bar_id != NO_PCI_REG) { MPASS(sc->sc_hw.qhw_sram_bar_id == 0); @@ -1119,7 +1108,7 @@ qat_etr_bank_intr(void *arg) struct qat_bank *qb = arg; struct qat_softc *sc = qb->qb_sc; uint32_t estat; - int i, handled = 0; + int i; mtx_lock(&qb->qb_bank_mtx); @@ -1137,7 +1126,7 @@ qat_etr_bank_intr(void *arg) while ((i = ffs(estat)) != 0) { struct qat_ring *qr = &qb->qb_et_rings[--i]; estat &= ~(1 << i); - handled |= qat_etr_ring_intr(sc, qb, qr); + (void)qat_etr_ring_intr(sc, qb, qr); } } diff --git a/sys/dev/qat/qat_ae.c b/sys/dev/qat/qat_ae.c index 9d0a93955195..853069706079 100644 --- a/sys/dev/qat/qat_ae.c +++ b/sys/dev/qat/qat_ae.c @@ -2173,7 +2173,6 @@ static int qat_aefw_uof_parse_images(struct qat_softc *sc) { struct uof_chunk_hdr *uch = NULL; - u_int assigned_ae; int i, error; for (i = 0; i < MAX_NUM_AE * MAX_AE_CTX; i++) { @@ -2191,11 +2190,6 @@ qat_aefw_uof_parse_images(struct qat_softc *sc) sc->sc_aefw_uof.qafu_num_imgs++; } - assigned_ae = 0; - for (i = 0; i < sc->sc_aefw_uof.qafu_num_imgs; i++) { - assigned_ae |= sc->sc_aefw_uof.qafu_imgs[i].qui_image->ui_ae_assigned; - } - return 0; } @@ -3273,7 +3267,7 @@ qat_aefw_do_pagein(struct qat_softc *sc, u_char ae, struct qat_uof_page *qup) { struct qat_ae *qae = &(QAT_AE(sc, ae)); uint64_t fill, *ucode_cpybuf; - u_int error, i, upaddr, uraddr, ninst, cpylen; + u_int error, i, upaddr, ninst, cpylen; if (qup->qup_num_uc_var || qup->qup_num_neigh_reg || qup->qup_num_imp_var || qup->qup_num_imp_expr) { @@ -3289,7 +3283,6 @@ qat_aefw_do_pagein(struct qat_softc *sc, u_char ae, struct qat_uof_page *qup) sizeof(uint64_t)); upaddr = qup->qup_beg_paddr; - uraddr = 0; ninst = qup->qup_num_micro_words; while (ninst > 0) { cpylen = min(ninst, UWORD_CPYBUF_SIZE); @@ -3338,7 +3331,6 @@ qat_aefw_do_pagein(struct qat_softc *sc, u_char ae, struct qat_uof_page *qup) return ENOTSUP; } upaddr += cpylen; - uraddr += cpylen; ninst -= cpylen; }