From nobody Tue Apr 12 21:59:28 2022 X-Original-To: dev-commits-src-all@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 CA5231AFC22E; Tue, 12 Apr 2022 21:59:29 +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 4KdKPr72TLz4hst; Tue, 12 Apr 2022 21:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649800769; 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=0OsTH04eF2JpMIEQzD958XHkk/ie1ZIbxpjMoFqXLYI=; b=NgmmyIqS3dOIJ3HZHSk1pC0BrMU6+N6uBKkvJCsEUHpBqKsTtnXZFhot3PHPkRs39lmzSq IIvkAzaKbGOACH/HTi7xeZsRKSrJlRJ86lJxpYla7ECkLP6/XvEiAlJnGtc01L/BsIaQOc iub6rk3phf2+jY1q/pLOtn40mw0tSXOH53BfBPtWWAUaVmPRtErqPdJgtEerQfxGm1NoVz XdNJLi4OrX49Wy42K3BuFlIszx4/pWOucOYptdeSE9NmZjCQXIEMYeE0u0WoCv2vnR5i7P Bd/wZ3IGQ0lbbTB88oghEGcB7NezFz7ejoOMBazhRKUVLgI9hWK0VQpOKPT0vQ== 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 CB1DA1F7D6; Tue, 12 Apr 2022 21:59:28 +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 23CLxSXY035579; Tue, 12 Apr 2022 21:59:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23CLxS9S035578; Tue, 12 Apr 2022 21:59:28 GMT (envelope-from git) Date: Tue, 12 Apr 2022 21:59:28 GMT Message-Id: <202204122159.23CLxS9S035578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b2a8b342f35d - main - llan: Remove unused variables. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2a8b342f35d937bd41a1a764e97b872255d7126 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649800769; 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=0OsTH04eF2JpMIEQzD958XHkk/ie1ZIbxpjMoFqXLYI=; b=EPxzV5A6DcS/13fMad7oZYw0RHZwxtnWpC3AXHiClv8GVvNDKVzzJjPMUKhSLvKrtH4PCq gNu6XXqgK7XydmgUgfVW8442CVGezUXn43XaENKGbchyaVIgALik80LkgRjQe8bLcijVo5 lmuzLOgJu+NoTMr2ZvBjW09T2eIPWt9RBpENKeaSUFxeAGAb62h1KJlSXVbQlzRIb7dXn5 pmMubf4wfhO+TCzoamPjJppTVlXQMhhI0cxAZ/fdBQOOh5bkYjVxxgIHmE9juXjZ8wODdI HN4j8nEGTYRtypWsB8cXakP6JM2XaalDNWNDMPp8qrv5zYKbyvjTWL00oRWsiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649800769; a=rsa-sha256; cv=none; b=Xwpm31IivUFB/Ynm2yMXNKT9I0eaQOl1Qzbd41MKgPzJm7qmqWh0B8zDuMTDP1nzzUl9Kn HLqw9MW70dhKac3kZgdf/qlQjNIkdrSJ5b8SQD+QNhfCjLO5m466jJemTn9ML+guaohxHW ld4jCH6AcQ8UzMEimRV03npk3YBEaJyohf270qqDHqm9aj07K5cOVYwgKF8P0TD83w/aY6 vscID/VPMn48GwSfE+5AYQX0RYuSxmGTzi6lw3PtR2C7QkSyXCEQ4lVRFLfYrkM2Kn8MJO dEduh3enyyDtbLtIeQt46dKJk2NYAKE1lXY8wUV4PE55lIP5c9jpydESh333bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b2a8b342f35d937bd41a1a764e97b872255d7126 commit b2a8b342f35d937bd41a1a764e97b872255d7126 Author: John Baldwin AuthorDate: 2022-04-12 21:58:59 +0000 Commit: John Baldwin 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)