From nobody Thu Aug 24 21:15:18 2023 X-Original-To: dev-commits-src-branches@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 4RWwpZ6my1z4rZtr; Thu, 24 Aug 2023 21:15:18 +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 4RWwpZ6JN7z3TwY; Thu, 24 Aug 2023 21:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692911718; 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=/q4p1CWZMrYgEwjS76jR7/zuNvn6gjGqQLIEPo7Arsg=; b=k6r0LH/yA9kub7YqJFLH3sjYvXAWbGTGNPtkcCM150dTHiH76479732wkWd6H5teb0EHLF 2WkDEQqX/3kvgwe7dVRFyxNqU7CYji6R+5YkjAb4paV1zNtfjze/GPK/1BEGLjge8SPCfD 17xrLwnv4YMQbO1yQNFdmBsY26bBQ38FMOtIsmudLMHWuCZKWH3IjfL3Zjmc26ZLzihcum sS5kZ14DSf0oPVkKpyT5H1vfe9nvMg0HHBxNqbkMfxyJXA2eUwg2dfa+VQyTBTxk5Xsgya e7uvvBFv6ltWVB54s6+vtzOlY1hioNbbyBso11UllnYm+MsfZrPKhLN94mTGwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692911718; 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=/q4p1CWZMrYgEwjS76jR7/zuNvn6gjGqQLIEPo7Arsg=; b=jP32BjNITK3ch5DL8smDY8y0YcVO6D2LBmEUN1YktT7phrRGd1Q2KcBGkR45NUO7PSXewI xV5COzZdlcE2t/9USdOtj9zQJSBRdn0ewvvNXr7R0ezatdPj00PFlqQkA72C6BGpEuuWXW +9qyf3uAo0B+IAJchvruVLHC3OKou1KbcVcBH4cw2AD7/qNWcY9ZYwWLCt2id4lbGzxvMJ yOh+DU8yZ9gt4tlt95VoQpPA54C9igor6Z2kPjtbm9bsAF13F9UsYHb7saCanSMLxhpkdk ykg3755G8GeFZD/4czd3EAYV4UBw261OJ21IZDgaq7QOSQGHjk1bZegfr2FmXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692911718; a=rsa-sha256; cv=none; b=sHU0UPCwlSPSMeho++YMmy8A+3DyIGfnVAFGbvvGHgGDxVI0ldVZeiUA36w13aH/nvcU/6 GvmVhz4/A625EefGfG6OyWkvdRuJtnxgACVL4/SFXjjGqVTsMyQjXDQ/GQSifZTetT/R7x c1gKZEWT1ARIApBKJ0BoSplwMhWr2Sxca7OQts93QC2PN+0OOz10DoKIG2BCRmIF/jBQ+D E4qCGttSM44a7Kujhf0piFKj2BYbmxFcSmWe7weon95oXRWwgPcjY/wpqZpOFvcgibDXe3 J0aKM/5vCNJJQQfQ5RW85g6PoJzBj+8tJn2vg+xvqsS2pVy1vAjj27CgNNCIqw== 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 4RWwpZ5M1Pzhyq; Thu, 24 Aug 2023 21:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37OLFIqS075128; Thu, 24 Aug 2023 21:15:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37OLFIAD075126; Thu, 24 Aug 2023 21:15:18 GMT (envelope-from git) Date: Thu, 24 Aug 2023 21:15:18 GMT Message-Id: <202308242115.37OLFIAD075126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 3df6b1d39af5 - stable/13 - iflib: Remove redundant variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3df6b1d39af58620edf59be076ab134bf90e083d Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=3df6b1d39af58620edf59be076ab134bf90e083d commit 3df6b1d39af58620edf59be076ab134bf90e083d Author: Eric Joyner AuthorDate: 2023-08-04 17:57:11 +0000 Commit: Eric Joyner CommitDate: 2023-08-24 21:07:22 +0000 iflib: Remove redundant variable In iflib_init_locked(), sctx and scctx both point to the same value, which is the ifc_softc_ctx field in the iflib softc. Remove the declaration and assignment to sctx since scctx can be used instead, and the name of scctx follows the naming convention used for local variables that point to ifc_softc_ctx. In theory there should be no functional impact with this change. Signed-off-by: Eric Joyner Reviewed by: kbowling@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41325 (cherry picked from commit d2dd3d5a989d1a2c9ebfbb90a1e682d3ad9db3c3) --- sys/net/iflib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 2ee246170211..2a0181fa2d77 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2456,7 +2456,6 @@ iflib_get_rx_mbuf_sz(if_ctx_t ctx) static void iflib_init_locked(if_ctx_t ctx) { - if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; if_t ifp = ctx->ifc_ifp; iflib_fl_t fl; @@ -2486,7 +2485,7 @@ iflib_init_locked(if_ctx_t ctx) if (if_getcapenable(ifp) & IFCAP_TSO6) if_sethwassistbits(ifp, CSUM_IP6_TSO, 0); - for (i = 0, txq = ctx->ifc_txqs; i < sctx->isc_ntxqsets; i++, txq++) { + for (i = 0, txq = ctx->ifc_txqs; i < scctx->isc_ntxqsets; i++, txq++) { CALLOUT_LOCK(txq); callout_stop(&txq->ift_timer); #ifdef DEV_NETMAP @@ -2508,7 +2507,7 @@ iflib_init_locked(if_ctx_t ctx) #endif IFDI_INIT(ctx); MPASS(if_getdrvflags(ifp) == i); - for (i = 0, rxq = ctx->ifc_rxqs; i < sctx->isc_nrxqsets; i++, rxq++) { + for (i = 0, rxq = ctx->ifc_rxqs; i < scctx->isc_nrxqsets; i++, rxq++) { if (iflib_netmap_rxq_init(ctx, rxq) > 0) { /* This rxq is in netmap mode. Skip normal init. */ continue; @@ -2526,7 +2525,7 @@ done: if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); IFDI_INTR_ENABLE(ctx); txq = ctx->ifc_txqs; - for (i = 0; i < sctx->isc_ntxqsets; i++, txq++) + for (i = 0; i < scctx->isc_ntxqsets; i++, txq++) callout_reset_on(&txq->ift_timer, iflib_timer_default, iflib_timer, txq, txq->ift_timer.c_cpu);