mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
qat: Address -Wunused-but-set-variable warnings
MFC after: 1 week
This commit is contained in:
parent
30ec3138ed
commit
8fcf230c13
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue