aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/qat/qat.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2021-12-10 15:52:30 +0000
committerMark Johnston <markj@FreeBSD.org>2021-12-17 18:10:22 +0000
commit8fcf230c1377c4598a7aa6560ec43ff46662fbaa (patch)
tree1403527721e1cb6ada41a1e6849861875e62f955 /sys/dev/qat/qat.c
parent30ec3138edc9d491446409910f52ccb1b158253e (diff)
downloadsrc-8fcf230c1377c4598a7aa6560ec43ff46662fbaa.tar.gz
src-8fcf230c1377c4598a7aa6560ec43ff46662fbaa.zip
qat: Address -Wunused-but-set-variable warnings
MFC after: 1 week
Diffstat (limited to 'sys/dev/qat/qat.c')
-rw-r--r--sys/dev/qat/qat.c17
1 files changed, 3 insertions, 14 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);
}
}