From nobody Mon Jan 26 09:33:20 2026 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 4f03Hj1Dwtz6Q1Jx for ; Mon, 26 Jan 2026 09:33:21 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f03Hj0Xt4z3JTJ for ; Mon, 26 Jan 2026 09:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769420001; 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=cYjFfvlKF3cPdltV/2+Exf6AqPFlRhYE7erb1PhI9fA=; b=VL1RKnYnHOQtxGBJw4Lym31M5vnDwIiXIsR8O9wZOGo0pgBK5PfRrF7tCAL8cF2y74aiXR tgNhiSI31Q4R3fi2j9cuaGK1mZSsqk9JQvUs88yvOgtAMnKiKk05IMwUYEPlmSNJEFsCwd wBBTbRKhJz7eCOxmtAXnDYigG7jXfxAkWA5DNuA3lJB1SzC9LfYJFJqLOL9Vf3ECS+tmgr xE8FvUrJxAzy14p6r3Pbn5yR/ah1wDa64J55MoLD8UIT3rylDzRon8AE8e2ugPCgBarqPi 2JBTNjN7cQerkty7KvdOLb5EVarxai+C5pHdPoeTXIpDJ49SUchNni0yYNBppA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769420001; 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=cYjFfvlKF3cPdltV/2+Exf6AqPFlRhYE7erb1PhI9fA=; b=mBsv2cqMIAaS9lMoiyQ7R6vUwjy+FSn9xEMiIF2XmTB33u6qYPPpvmeWwXgwPfwFiP2Y+1 aLq4kRipgrDvDQPy0ANzMv4lLZG04/iHTy8YzaT7TxQzYpm3vM6EDRE4JdfOGlFBiS1ERf B9ZBM0KUvXqczf/Dy2REgtB2OZZPXDEMLARJd5gB9lSbpJ+PvHPQSpJEL1xOY7sJW0CmxZ SOuqPmdc+PoKpOoEMNEQ5DO9QmWqxmTyGsCk+GrtaBj7KCJ4AIKj70zgbmpo4EGWmbKQNk F2u8njpje/J8Ozzy11R9Baeq1lifzSVbdRFCQaO9WMyFDOhSJFpT7ZUbVzzFLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769420001; a=rsa-sha256; cv=none; b=MsBkVyPY93JbsH2D1y7ijinEcgvXGhMuZVZ+JVNyZ49RJ/BiMifwvqU/3OFmL8M0Lo1psl f8DG9prZl4AwxX7RNFjzoSxaXCGbrKfISPCh3E6dhg1ogi8+vaCq45vp7FRLMJSnBP0Z8J AVLNERjHGPQ8EZFPYz8RrVZHCOBGBt9u3vDdrfpMRVetHN/JU0BVvM8GDtxbQYK3K2auit Qqgk5uA0rncuRHxjdA/4xZfHM4nqeTFbpD7fpCr3IVmf3uW3RTfiT+UaPKVPcN+AxlMIn/ tyKIDRcXhARSrctSjxPFrGAUE2FxPd7eqO8FStrIsYFPP0rnMiKNBpxTHh5ozA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f03Hh6zVpzPr for ; Mon, 26 Jan 2026 09:33:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3523b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 26 Jan 2026 09:33:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 6ecaa8dfb64b - main - sys/module.h: allow MODULE_DEPEND to accept macros 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: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ecaa8dfb64b796085afdf597ec3a79878bde12f Auto-Submitted: auto-generated Date: Mon, 26 Jan 2026 09:33:20 +0000 Message-Id: <697734e0.3523b.477579cd@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=6ecaa8dfb64b796085afdf597ec3a79878bde12f commit 6ecaa8dfb64b796085afdf597ec3a79878bde12f Author: Ahmad Khalifa AuthorDate: 2026-01-26 09:27:59 +0000 Commit: Ahmad Khalifa CommitDate: 2026-01-26 09:32:10 +0000 sys/module.h: allow MODULE_DEPEND to accept macros Allow MODULE_DEPEND to accept macros by adding an extra level of indirection. Some drivers in the tree actually depend on this being the case. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54874 --- sys/sys/module.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/sys/module.h b/sys/sys/module.h index f749455bdf63..b4a08e2fc26f 100644 --- a/sys/sys/module.h +++ b/sys/sys/module.h @@ -116,15 +116,17 @@ struct mod_pnp_match_info }; \ DATA_SET(modmetadata_set, MODULE_METADATA_CONCAT(uniquifier)) +#define MODULE_DEPEND_CONCAT(module, mdepend) _##module##_depend_on_##mdepend #define MODULE_DEPEND(module, mdepend, vmin, vpref, vmax) \ - static struct mod_depend _##module##_depend_on_##mdepend \ + static struct mod_depend MODULE_DEPEND_CONCAT(module, mdepend) \ __section(".data") = { \ vmin, \ vpref, \ vmax \ }; \ - MODULE_METADATA(_md_##module##_on_##mdepend, MDT_DEPEND, \ - &_##module##_depend_on_##mdepend, #mdepend) + MODULE_METADATA(MODULE_DEPEND_CONCAT(module, mdepend), \ + MDT_DEPEND, &MODULE_DEPEND_CONCAT(module, mdepend), \ + __XSTRING(mdepend)) /* * Every kernel has a 'kernel' module with the version set to