From nobody Wed Apr 06 03:43:02 2022 X-Original-To: dev-commits-src-main@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 372D21A91A04; Wed, 6 Apr 2022 03:43:03 +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 4KY9MV4byZz4sDs; Wed, 6 Apr 2022 03:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649216583; 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=kE3tc7Cy9D9gMqCmBNIekihavcLIilm7I3zG9tl2yao=; b=OtRAhZsXN2ajyH6BfrW/l31iZrNo383lVS89ZvVxJoWf7+7SZzbkabXgKI2H8fOjliEE4I uJA0gJL8ImygSjD21BGIY7eiYkqh8Br9RFI9SGTewB5tolq3lZdRdgVjxnu1flzXhUh7Fa WPmXRqu9fxX9QeMybi0ktDqSGTqwMPnhiAMvtaPy9a27ZddTNVTeOBpzvlozsqBES2dwqs Tbj2HrFJqjyo3ykuaD5WwJwtmydi5b7cnao/SSTQQQig6hud+1AEBvTWvkmKIrIGpBIMHm ObsHA/smZy+qV8WIEjeIiBmlytMIqvqNbUqCtP93tnMYRvy+O0n6wM3darEsfA== 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 4E8DA139CB; Wed, 6 Apr 2022 03:43: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 2363h2SV089288; Wed, 6 Apr 2022 03:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2363h2Gc089287; Wed, 6 Apr 2022 03:43:02 GMT (envelope-from git) Date: Wed, 6 Apr 2022 03:43:02 GMT Message-Id: <202204060343.2363h2Gc089287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7e5c042cced9 - main - msk: Remove write only variables, but leave hardware reads in place List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e5c042cced9f2fba00133af25ea0ee96f435f5d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649216583; 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=kE3tc7Cy9D9gMqCmBNIekihavcLIilm7I3zG9tl2yao=; b=Z6/SrbaQ44tnwoAvTSRBJmHjtY5DUssa/COEwv/f5bT9VlJUSH4UUlgXwGJE67By5FJeZ/ escJETMpz6L9+y7pRsGt8RN8lph7ik29VHh7P9pOVkCFXtRK4wDdNC6N/gAmrqcWyv9XK4 G2g+d4R8Yyu52qg7jmN0Lev/emw6AdKomnwUGbsE/FD1GhCr0rA2Ri/knzOSIbi/WQBUXA Q5m6bewMswtBsaC5gh2rC6re+RfudHk5Wl9eAkuKA5913ufgL+zwgPa0OeaiRJ7A5vNQiP XDWAHy+FcpNlyzwAlXNDH+1cofLKpI9EqSFZ0I1y3V+Alj4qDPvR1F4LyL3DKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649216583; a=rsa-sha256; cv=none; b=fUIPOzJEHPwovLRZCHLQIHsyEQSLU5MgtGJwEU75vVyaFuasqsVIrX9mitkhn1zlBzcPth dsvPu+ublA+msYdNE7tMgFnHQ9AytLgX1EICl5lFoOVd341qZ27fNkju/EtpZ0yGST5qPf MajaKQ/KlmG3PGSG/qk5bufbZlgAuoVk4L6loYOn8Tqdvkt/FUvImyzbMiYSQ1tx2Hdtqg IF2DhfQfkbFxm6y9+DCTBM5CMymnto9VHSOEAjD79oIPKToLVJQEtbOp6LZXlrFNBS5b4B E8nopd9q0reyrUEFUs/ZMzIWv+C1315g9jrnGd/PhcrZtEk82F9cieEjFkArfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7e5c042cced9f2fba00133af25ea0ee96f435f5d commit 7e5c042cced9f2fba00133af25ea0ee96f435f5d Author: Warner Losh AuthorDate: 2022-04-06 02:01:47 +0000 Commit: Warner Losh CommitDate: 2022-04-06 03:42:06 +0000 msk: Remove write only variables, but leave hardware reads in place Sponsored by: Netflix --- 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 +=