From nobody Mon Aug 07 22:47:11 2023 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 4RKWfR6X5Wz4mT0r; Mon, 7 Aug 2023 22:47:11 +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 4RKWfR5MfFz4RJw; Mon, 7 Aug 2023 22:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691448431; 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=WKDbd8pD4sTrRBvvCVo4M/nfiWXcLmfmH/hy5YFv54I=; b=Xt1kqxkhvDQgeXd8B3nvz+3aYMEVOHcuBM01H2wCAhF3IFNDO4SlBpOAasVORTtUQ+6FLA y9MYZ9Z4lg48t55Rpj2r8Eym5IUUUXaN+K/d6i0ksplp1v8g92IV2Qk2yOdYUuYiDxDnbk 53c8dwej+8GRBb3HgygR1G+QZdZh3nqx2Dr5hXGWWOKLss0/tDQBDjfPDmTfdB5h0JqI7Y vF/EdpqkmFxZd0hHRx8F2IOrdS35iW4eXenz5NLhOThPxrcy6HxEgqhHiuzUVL2wv2jvsF SeeAUc68E13oi2n/4ObVlMNonbMtMmJXitEx7ZeDGMDT81suC7z7CqOLUdOR7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691448431; 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=WKDbd8pD4sTrRBvvCVo4M/nfiWXcLmfmH/hy5YFv54I=; b=CfOCLFhmVcyV37HK2r9OkmW46fZE2WKQZHYq3AI+qFjLISnhp2Ad3IerejRctRR69EbdGs skjK18RtePy8GrxTNg9/e4qHpX+/DZp8rsRc0qpMTiKFdkzM4R8au/V+qx030wQ14dJeF/ DwlSGClsGHhYr/fj/B/9zOMKX5h82jaD410N3cJu6W2oZIcrHeYe30fcZLuNosDWDSOpye 9kHjOPNLIvIxENB+o6jV5EyJWE6UkMmvH3GrOq3ootdSAkJ9Ybhnjtu+wxDCqfb3ogPJYo ZuL8ptFoOua+A/Mc3y4ivF6sgaQmeIqVDH0Ox7nbK/BIrjbEzuUm+yOZW+DSHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691448431; a=rsa-sha256; cv=none; b=J/9YnOJrfCEnM1GW8ItWErgPMJihDiDA2+GG0PETnkO7ElXYPaDnCKMe9xSyNBRPKYcCHd W+S1hRLbARO9wyIAtgt6s4m/LrGjjx+2AnU3icv8X555S9JwniViEMk5tPHrpX57YQ3Cd+ N/xnih26MJu09GPHC0asA6cPVmeifmSSUrrnd5YVJtLRm7Ib6FPcplnan/wSVH1dSaIFFg TmATxJu/IfjCebhczZG5IkeaX+/9gYz3bgYeyYQzHhAdqdcEFmteHv1if56Er4nfNhlwSl O6XsdZcLAp1f7fewmdBlAX1qtrOtuy/eW9tS9VKwyFCB9Uf2YGbC7Rl++lDrHQ== 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 4RKWfR4HH1z19Dm; Mon, 7 Aug 2023 22:47:11 +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 377MlBVm059138; Mon, 7 Aug 2023 22:47:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 377MlBif059137; Mon, 7 Aug 2023 22:47:11 GMT (envelope-from git) Date: Mon, 7 Aug 2023 22:47:11 GMT Message-Id: <202308072247.377MlBif059137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: d2dd3d5a989d - main - iflib: Remove redundant variable 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: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2dd3d5a989d1a2c9ebfbb90a1e682d3ad9db3c3 Auto-Submitted: auto-generated The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=d2dd3d5a989d1a2c9ebfbb90a1e682d3ad9db3c3 commit d2dd3d5a989d1a2c9ebfbb90a1e682d3ad9db3c3 Author: Eric Joyner AuthorDate: 2023-08-04 17:57:11 +0000 Commit: Eric Joyner CommitDate: 2023-08-07 22:46:48 +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@ MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41325 --- 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 f4c0e5d54cab..ad2afa77b72c 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2476,7 +2476,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; @@ -2506,7 +2505,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 @@ -2528,7 +2527,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; @@ -2546,7 +2545,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);