From nobody Sat Aug 30 15:25:03 2025 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 4cDf8H6gXZz65dXQ; Sat, 30 Aug 2025 15:25: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cDf8H5mlkz3ZMl; Sat, 30 Aug 2025 15:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756567503; 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=RYRUHmKNUBU1uQbpQeH1AMILyCKnQCBoahQ+ab2MFIg=; b=v8Q5csyGKN1bmoN155uzzEzo93wzZ0pgb+eFmqdAbGYcNVcGmuCbya9zIvj1ssxji6Y9Rs E+qJNranZADBVoEGxZXpGrtF+V1PGSb+cPmuPWEl0gqiS8x7UOysYTWou+XV2hJLeObzHG 7w1wUkJbzM/8K+MrkERS3tZPGyU+JscfnukIllgfjNzUYKL687CO0AK1P4K0p9e+a0+BFb sVGWVdARkhpOeMSc7yjxNP5ljlubuk4x3XiTRZNwpjOtdN4Fqqp2RgC8OuYgRik+lS7YTl fidLSvNA121c07lwzcdnaFtmVvlRZYxEiRPnI1fM73eqPtSdOxIkPpYkm+WHXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756567503; 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=RYRUHmKNUBU1uQbpQeH1AMILyCKnQCBoahQ+ab2MFIg=; b=hiAJS2rZIvNoMvWqAyrzrDXlu/OWHxYhhz2J4SEGAzjz7Iu/DkBNf71tLsOsbvQZUch+vr cjAVty1djLV/Kk8MfOol9DK77Jyr578mfcZS+KLA8Qu7PRGA87NhI/I+X8+aELFFBxQWnI 6Dy5LZXYoiBrPe/BL8QQyW84MAcMCsCPUTyvVM2t5oFjIDawnRyHxDgG50OIyx3U9W1AhH YPPoRURSigCWa/YEUa/MJbTEku0Rqs88FL3zeiXcMAswDwbX77MKnPigNYl87syyw6h0g2 w8nK51isiqpD69tJ90ZPm1wfNYnMDHx61GHkMN+gqS0BCZNpHdP+hIxbq7NAaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1756567503; a=rsa-sha256; cv=none; b=JT9u0037AtNocbm367OkfyG8eb84LhrStYCMekQcU1OYK/DSsqCmrHFP+BXPgKFtSBqg/t oa14ws9C3RVOJH34w1wzShEOl3tXXDwxC26wXNZ791yXqf0hUu+u166ErficOQN9KJxhZO Et4OtpID9my3Qz3KV946+5KceEduzdjVQRXjtWXiXguZx+ccXN8/fxGTT9Ar7kUyFSoNoP ktrMDL6ORnAcbY/5vxOyyj0QWjx8uuzEBIBOl5GPW2zzICFM7vbjDW6Q2Ai56UbuPP840j HvMC3FG2ilHPvbNPjgG5eC596sWLAcFtS8HZBj9oi2766YuQ1XetacSKO5WsPw== 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 4cDf8H5JcszY9j; Sat, 30 Aug 2025 15:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 57UFP3vP032534; Sat, 30 Aug 2025 15:25:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57UFP38S032531; Sat, 30 Aug 2025 15:25:03 GMT (envelope-from git) Date: Sat, 30 Aug 2025 15:25:03 GMT Message-Id: <202508301525.57UFP38S032531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: bb5135d0f227 - main - iflib: Make iflib_register() return void 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb5135d0f2276e84b7abfcc481c92000647f68d4 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bb5135d0f2276e84b7abfcc481c92000647f68d4 commit bb5135d0f2276e84b7abfcc481c92000647f68d4 Author: Zhenlei Huang AuthorDate: 2025-08-30 15:23:51 +0000 Commit: Zhenlei Huang CommitDate: 2025-08-30 15:23:51 +0000 iflib: Make iflib_register() return void It never fails since change [1]. No functional change intended. [1] aa3860851b9f net: Remove unneeded NULL check for the allocated ifnet Reviewed by: kbowling, #iflib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50713 --- sys/net/iflib.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 98c59e5de988..992f3f24c178 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -712,7 +712,7 @@ static uint32_t iflib_txq_can_drain(struct ifmp_ring *); static void iflib_altq_if_start(if_t ifp); static int iflib_altq_if_transmit(if_t ifp, struct mbuf *m); #endif -static int iflib_register(if_ctx_t); +static void iflib_register(if_ctx_t); static void iflib_deregister(if_ctx_t); static void iflib_unregister_vlan_handlers(if_ctx_t ctx); static uint16_t iflib_get_mbuf_size_for(unsigned int size); @@ -5136,10 +5136,7 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct ctx->ifc_dev = dev; ctx->ifc_softc = sc; - if ((err = iflib_register(ctx)) != 0) { - device_printf(dev, "iflib_register failed %d\n", err); - goto fail_ctx_free; - } + iflib_register(ctx); iflib_add_device_sysctl_pre(ctx); scctx = &ctx->ifc_softc_ctx; @@ -5387,7 +5384,6 @@ fail_unlock: CTX_UNLOCK(ctx); IFNET_WUNLOCK(); iflib_deregister(ctx); -fail_ctx_free: device_set_softc(ctx->ifc_dev, NULL); if (ctx->ifc_flags & IFC_SC_ALLOCATED) free(ctx->ifc_softc, M_IFLIB); @@ -5685,7 +5681,7 @@ _iflib_pre_assert(if_softc_ctx_t scctx) MPASS(scctx->isc_txrx->ift_rxd_flush); } -static int +static void iflib_register(if_ctx_t ctx) { if_shared_ctx_t sctx = ctx->ifc_sctx; @@ -5731,7 +5727,6 @@ iflib_register(if_ctx_t ctx) ifmedia_init(ctx->ifc_mediap, IFM_IMASK, iflib_media_change, iflib_media_status); } - return (0); } static void