From owner-svn-src-all@freebsd.org Wed Apr 29 14:36:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FAD32B658E; Wed, 29 Apr 2020 14:36:51 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49C1LC2QcMz4HnY; Wed, 29 Apr 2020 14:36:51 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E8FD6FA4; Wed, 29 Apr 2020 14:36:51 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03TEapCn050861; Wed, 29 Apr 2020 14:36:51 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03TEaoZl050859; Wed, 29 Apr 2020 14:36:50 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202004291436.03TEaoZl050859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 29 Apr 2020 14:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360467 - head/sys/dev/dwc X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/dev/dwc X-SVN-Commit-Revision: 360467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 14:36:51 -0000 Author: mmel Date: Wed Apr 29 14:36:50 2020 New Revision: 360467 URL: https://svnweb.freebsd.org/changeset/base/360467 Log: Fix style(9). Strip write only variables. Not a functional change. MFC after: 1 week Modified: head/sys/dev/dwc/if_dwc.c head/sys/dev/dwc/if_dwcvar.h Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Wed Apr 29 14:31:25 2020 (r360466) +++ head/sys/dev/dwc/if_dwc.c Wed Apr 29 14:36:50 2020 (r360467) @@ -252,14 +252,13 @@ dwc_txstart_locked(struct dwc_softc *sc) ifp = sc->ifp; - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) { + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) return; - } enqueued = 0; for (;;) { - if (sc->txcount == (TX_DESC_COUNT-1)) { + if (sc->txcount == (TX_DESC_COUNT - 1)) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } @@ -268,7 +267,7 @@ dwc_txstart_locked(struct dwc_softc *sc) if (m == NULL) break; if (dwc_setup_txbuf(sc, sc->tx_idx_head, &m) != 0) { - IFQ_DRV_PREPEND(&ifp->if_snd, m); + IFQ_DRV_PREPEND(&ifp->if_snd, m); break; } BPF_MTAP(ifp, m); @@ -469,7 +468,7 @@ dwc_setup_rxdesc(struct dwc_softc *sc, int idx, bus_ad sc->rxdesc_ring[idx].addr = (uint32_t)paddr; nidx = next_rxidx(sc, idx); - sc->rxdesc_ring[idx].addr_next = sc->rxdesc_ring_paddr + \ + sc->rxdesc_ring[idx].addr_next = sc->rxdesc_ring_paddr + (nidx * sizeof(struct dwc_hwdesc)); if (sc->mactype == DWC_GMAC_ALT_DESC) sc->rxdesc_ring[idx].tdes1 = DDESC_CNTL_CHAINED | RX_MAX_PACKET; @@ -493,9 +492,8 @@ dwc_setup_rxbuf(struct dwc_softc *sc, int idx, struct error = bus_dmamap_load_mbuf_sg(sc->rxbuf_tag, sc->rxbuf_map[idx].map, m, &seg, &nsegs, 0); - if (error != 0) { + if (error != 0) return (error); - } KASSERT(nsegs == 1, ("%s: %d segments returned!", __func__, nsegs)); @@ -1167,10 +1165,6 @@ dwc_attach(device_t dev) device_printf(dev, "could not allocate resources\n"); return (ENXIO); } - - /* Memory interface */ - sc->bst = rman_get_bustag(sc->res[0]); - sc->bsh = rman_get_bushandle(sc->res[0]); /* Read MAC before reset */ if (dwc_get_hwaddr(sc, macaddr)) { Modified: head/sys/dev/dwc/if_dwcvar.h ============================================================================== --- head/sys/dev/dwc/if_dwcvar.h Wed Apr 29 14:31:25 2020 (r360466) +++ head/sys/dev/dwc/if_dwcvar.h Wed Apr 29 14:36:50 2020 (r360467) @@ -57,8 +57,6 @@ struct dwc_bufmap { struct dwc_softc { struct resource *res[2]; - bus_space_tag_t bst; - bus_space_handle_t bsh; device_t dev; int mactype; int mii_clk;