git: b2a8b342f35d - main - llan: Remove unused variables.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Apr 2022 21:59:28 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b2a8b342f35d937bd41a1a764e97b872255d7126 commit b2a8b342f35d937bd41a1a764e97b872255d7126 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-12 21:58:59 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-12 21:58:59 +0000 llan: Remove unused variables. In theory the errors during llan_attach should be handled, but other errors in llan_attach (e.g. bus_setup_intr) are already ignored, so just remove the unused variable to preserve the status quo. --- sys/powerpc/pseries/phyp_llan.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/powerpc/pseries/phyp_llan.c b/sys/powerpc/pseries/phyp_llan.c index 9b76962f70f9..1edc342ceb44 100644 --- a/sys/powerpc/pseries/phyp_llan.c +++ b/sys/powerpc/pseries/phyp_llan.c @@ -156,7 +156,7 @@ llan_attach(device_t dev) { struct llan_softc *sc; phandle_t node; - int error, i; + int i; ssize_t len; sc = device_get_softc(dev); @@ -193,22 +193,22 @@ llan_attach(device_t dev) INTR_ENTROPY, NULL, llan_intr, sc, &sc->irq_cookie); /* Setup DMA */ - error = bus_dma_tag_create(bus_get_dma_tag(dev), 16, 0, + bus_dma_tag_create(bus_get_dma_tag(dev), 16, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, LLAN_RX_BUF_LEN, 1, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->rx_dma_tag); - error = bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0, + bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, 1, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->rxbuf_dma_tag); - error = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, + bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, 6, BUS_SPACE_MAXSIZE_32BIT, 0, busdma_lock_mutex, &sc->io_lock, &sc->tx_dma_tag); - error = bus_dmamem_alloc(sc->rx_dma_tag, (void **)&sc->rx_buf, + bus_dmamem_alloc(sc->rx_dma_tag, (void **)&sc->rx_buf, BUS_DMA_WAITOK | BUS_DMA_ZERO, &sc->rx_buf_map); - error = bus_dmamap_load(sc->rx_dma_tag, sc->rx_buf_map, sc->rx_buf, + bus_dmamap_load(sc->rx_dma_tag, sc->rx_buf_map, sc->rx_buf, LLAN_RX_BUF_LEN, llan_rx_load_cb, sc, 0); /* TX DMA maps */ @@ -216,7 +216,7 @@ llan_attach(device_t dev) /* RX DMA */ for (i = 0; i < LLAN_MAX_RX_PACKETS; i++) { - error = bus_dmamap_create(sc->rxbuf_dma_tag, 0, + bus_dmamap_create(sc->rxbuf_dma_tag, 0, &sc->rx_xfer[i].rx_dmamap); sc->rx_xfer[i].rx_mbuf = NULL; } @@ -291,7 +291,7 @@ llan_init(void *xsc) struct llan_softc *sc = xsc; uint64_t rx_buf_desc; uint64_t macaddr; - int err, i; + int i; mtx_lock(&sc->io_lock); @@ -305,7 +305,7 @@ llan_init(void *xsc) rx_buf_desc |= (sc->rx_buf_len << 32); rx_buf_desc |= sc->rx_buf_phys; memcpy(&macaddr, sc->mac_address, 8); - err = phyp_hcall(H_REGISTER_LOGICAL_LAN, sc->unit, sc->input_buf_phys, + phyp_hcall(H_REGISTER_LOGICAL_LAN, sc->unit, sc->input_buf_phys, rx_buf_desc, sc->filter_buf_phys, macaddr); for (i = 0; i < LLAN_MAX_RX_PACKETS; i++) @@ -462,12 +462,10 @@ static void llan_start_locked(struct ifnet *ifp) { struct llan_softc *sc = ifp->if_softc; - bus_addr_t first; int nsegs; struct mbuf *mb_head, *m; mtx_assert(&sc->io_lock, MA_OWNED); - first = 0; if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING)