From nobody Fri Dec 17 18:11:49 2021 X-Original-To: dev-commits-src-main@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 4B8D218EF85B; Fri, 17 Dec 2021 18:11:51 +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 4JFxrj5BBJz4hvf; Fri, 17 Dec 2021 18:11:49 +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 83D68204CC; Fri, 17 Dec 2021 18:11:49 +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 1BHIBnwM005028; Fri, 17 Dec 2021 18:11:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BHIBnAH005027; Fri, 17 Dec 2021 18:11:49 GMT (envelope-from git) Date: Fri, 17 Dec 2021 18:11:49 GMT Message-Id: <202112171811.1BHIBnAH005027@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: 8fcf230c1377 - main - qat: Address -Wunused-but-set-variable warnings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 8fcf230c1377c4598a7aa6560ec43ff46662fbaa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639764710; 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=L+LlRE18pd9yFDltFVt2hYFisLdFcElEcR7P2+2quaQ=; b=gGE/dXPlIr4gjoSLhgellWtbk6kL+MFX075IoPlhUAZvrMns9dQPGBEgM7ZUzprjBozItL iGzox8sk3FC5rkbUyKqV5B2ikAXzeSHSQ9DPPdfMx0HwR6jLp7pN+XZxjdL+lyGO+Fqtb+ rbdWKQCeNOhoS2jaY6Gf3KK/yhOMUk3h27PlfePHYdjBGDRA40RVDJiKSiUp+fWOJDQzoe UD6khvfLUcAgtWOqZlZfDRSvMbb8mDc6ywXjYZWpbQKwAD/oI5xTiuWiG2ivbXojkljTI2 RybvcwPm8ouButajUhlKGhxfkzmH+JwtvEzyA2Yd9DPwmaCXUuX+GkpiwrmhIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639764710; a=rsa-sha256; cv=none; b=YD7H+LRA9QYjZ52l4Cg7Zvz6v39QChzxdNXCX8yDzXNTe6yMTRWSpNNlzBd2cQDmOk6454 q0rTJbCDsxb7Pw4hf1JO2ZNRuvFBTMig1D5ULsZe9B4NYQbH/d1ZUBLaRo2nuv1Vnrnev1 Zef7D3jLA9cL7Q9BYe00dFA3UdFLxSp4bUJnW15aDET6YsYK/qPH392Wpqmld+L7xsf+i3 NPy/T7s8RqBiDsvHIN29HmabZ6L8nvx0lnvZVb2UikGC/IAtwv55yldO3M0POJxp2H5W4k su2FANoYEEb4IJ2lR/2rto0Q1IPNvEauROFQ760MajnhPeCx9zcJpii677hoyw== 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=8fcf230c1377c4598a7aa6560ec43ff46662fbaa commit 8fcf230c1377c4598a7aa6560ec43ff46662fbaa Author: Mark Johnston AuthorDate: 2021-12-10 15:52:30 +0000 Commit: Mark Johnston CommitDate: 2021-12-17 18:10:22 +0000 qat: Address -Wunused-but-set-variable warnings MFC after: 1 week --- 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 68a3d2053f54..dddfe4da1083 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; }