The branch stable/13 has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=2520c9ba7e34abfc4717123b4f8d8d2460cd4df1

commit 2520c9ba7e34abfc4717123b4f8d8d2460cd4df1
Author:     Mark Johnston <[email protected]>
AuthorDate: 2021-12-10 15:52:30 +0000
Commit:     Mark Johnston <[email protected]>
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;
        }
 

Reply via email to