From nobody Fri Nov 11 18:37:02 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 4N86qy4CPXz4dbjN; Fri, 11 Nov 2022 18:37:02 +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 4N86qy3Y1Kz3wXf; Fri, 11 Nov 2022 18:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668191822; 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=LIVXfaD19OTflOPNrONuff85pecCnmoy1swcOzNMikU=; b=nc5KTE37av7Vw7R13P+0uo4fX+AtMyqjhEL3X6OxiCrL27XekQJLEVjtq+U8F4sNuC+zn1 pH6MUS35SKVoHCS79GGnwGuoAhZ2SbMasy6rr9B/jgbymoTJwrDS20zXTbPvKJBAePTKdv xbUEsUa4Z2csrB3B4u3m1K9llAjDpLPeZWfUUL18n0zPU/xxfZ3bYbkYOhE6N+q0e2cJEd iCljJKQ43l6EcKG1mBTl4qH2lXv3Qiz5I6+yYra7qsW/Yjba3J7mzoK9oo6M0hmPzPqzYb wDwWZBochzd6G3dPIOChz+R0X3LjMyinC9/8tld6EdHevVnbTl93l+Cno8DJMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668191822; 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=LIVXfaD19OTflOPNrONuff85pecCnmoy1swcOzNMikU=; b=Gmg1PNxYKfQ5Nm+/SzFcMxAdK/GJ2RXZ8RiZ6zGSvWBfEQ0tZb1YkI0UX7L8YFEURI/q3R +qLQmUhDqdfq+YLEXIMEfkZH1ON4AAfEnNO2HLqCJFSC185tUbY+R92ky4bVDaPwVNP6Rn Vp0SIgy1sSTI8gUPlsXokw/e7/ER+Icrq6GjR6vNx/YLfzG2A8SjujOLxCKhHXPij3gB7b Winad1+gCCAOmJaMJQ2wyhpSaZIuhSwegWtNRQzE5XuUUTMCLwmDa6NMsERbJ2tCcWt6+F O5feo4DaquN6el2LmkAgAbO/IqP47+Q/s8hSyEJCvaOTYf1A8ahwBz1GXKIm1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668191822; a=rsa-sha256; cv=none; b=LwI3md02uXDUrtprLp3/zp0quTDWFzkEoQM9CVi3LkGDl4jgR3YGA4NSHCgmlpl7oPrsWC XWKMJVldrKY+BPCr6spoVa0Oi36b4KwaEdZh/TOzfqZU4p0YI/0jKS1RP6Anc70QjxWop3 Esv73QbDyMgEa0p285BslnKcUgdHlGig5UORfHvUAnhyjHvK5OAAsRsoCJdnKiLOUlMs7w dx53aJQv2ryp+SzdbkNjk/MTAv2NXRmb8O0O+kP291PdNZIhqKKSdvKygF6Sy5uhkxtwvX DnfKKtkMc0BqpvvXE0Yjhm2fJdmP6/ScsUelySxy0WYpzQg7zawoU0w8GwGHuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4N86qy2ThJzt52; Fri, 11 Nov 2022 18:37:02 +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 2ABIb2uO004390; Fri, 11 Nov 2022 18:37:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ABIb24s004389; Fri, 11 Nov 2022 18:37:02 GMT (envelope-from git) Date: Fri, 11 Nov 2022 18:37:02 GMT Message-Id: <202211111837.2ABIb24s004389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2498e94fb6bb - stable/13 - msk: Remove write only variables, but leave hardware reads in place 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2498e94fb6bbe320df6a6c99be742e0277021d7d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2498e94fb6bbe320df6a6c99be742e0277021d7d commit 2498e94fb6bbe320df6a6c99be742e0277021d7d Author: Warner Losh AuthorDate: 2022-04-06 02:01:47 +0000 Commit: John Baldwin CommitDate: 2022-11-11 18:18:54 +0000 msk: Remove write only variables, but leave hardware reads in place Sponsored by: Netflix (cherry picked from commit 7e5c042cced9f2fba00133af25ea0ee96f435f5d) --- sys/dev/msk/if_msk.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index cf206c8f7971..73c6b4fa5458 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -4311,7 +4311,6 @@ static void msk_stats_clear(struct msk_if_softc *sc_if) { struct msk_softc *sc; - uint32_t reg; uint16_t gmac; int i; @@ -4323,7 +4322,7 @@ msk_stats_clear(struct msk_if_softc *sc_if) GMAC_WRITE_2(sc, sc_if->msk_port, GM_PHY_ADDR, gmac | GM_PAR_MIB_CLR); /* Read all MIB Counters with Clear Mode set. */ for (i = GM_RXF_UC_OK; i <= GM_TXE_FIFO_UR; i += sizeof(uint32_t)) - reg = MSK_READ_MIB32(sc_if->msk_port, i); + MSK_READ_MIB32(sc_if->msk_port, i); /* Clear MIB Clear Counter Mode. */ gmac &= ~GM_PAR_MIB_CLR; GMAC_WRITE_2(sc, sc_if->msk_port, GM_PHY_ADDR, gmac); @@ -4336,7 +4335,6 @@ msk_stats_update(struct msk_if_softc *sc_if) struct ifnet *ifp; struct msk_hw_stats *stats; uint16_t gmac; - uint32_t reg; MSK_IF_LOCK_ASSERT(sc_if); @@ -4360,7 +4358,7 @@ msk_stats_update(struct msk_if_softc *sc_if) MSK_READ_MIB32(sc_if->msk_port, GM_RXF_MC_OK); stats->rx_crc_errs += MSK_READ_MIB32(sc_if->msk_port, GM_RXF_FCS_ERR); - reg = MSK_READ_MIB32(sc_if->msk_port, GM_RXF_SPARE1); + MSK_READ_MIB32(sc_if->msk_port, GM_RXF_SPARE1); stats->rx_good_octets += MSK_READ_MIB64(sc_if->msk_port, GM_RXO_OK_LO); stats->rx_bad_octets += @@ -4387,10 +4385,10 @@ msk_stats_update(struct msk_if_softc *sc_if) MSK_READ_MIB32(sc_if->msk_port, GM_RXF_LNG_ERR); stats->rx_pkts_jabbers += MSK_READ_MIB32(sc_if->msk_port, GM_RXF_JAB_PKT); - reg = MSK_READ_MIB32(sc_if->msk_port, GM_RXF_SPARE2); + MSK_READ_MIB32(sc_if->msk_port, GM_RXF_SPARE2); stats->rx_fifo_oflows += MSK_READ_MIB32(sc_if->msk_port, GM_RXE_FIFO_OV); - reg = MSK_READ_MIB32(sc_if->msk_port, GM_RXF_SPARE3); + MSK_READ_MIB32(sc_if->msk_port, GM_RXF_SPARE3); /* Tx stats. */ stats->tx_ucast_frames += @@ -4417,7 +4415,7 @@ msk_stats_update(struct msk_if_softc *sc_if) MSK_READ_MIB32(sc_if->msk_port, GM_TXF_1518B); stats->tx_pkts_1519_max += MSK_READ_MIB32(sc_if->msk_port, GM_TXF_MAX_SZ); - reg = MSK_READ_MIB32(sc_if->msk_port, GM_TXF_SPARE1); + MSK_READ_MIB32(sc_if->msk_port, GM_TXF_SPARE1); stats->tx_colls += MSK_READ_MIB32(sc_if->msk_port, GM_TXF_COL); stats->tx_late_colls +=