From nobody Fri Sep 5 23:29:02 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 4cJXby6y6Rz66Yht; Fri, 05 Sep 2025 23:29:02 +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 4cJXby3dr8z40ls; Fri, 05 Sep 2025 23:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757114942; 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=n6Pzzt5F5fZS05TlJQgXiZ/i+yU0MyDbG1YsvqMVIsY=; b=CbfOBMZLMmDJ/CD+Lk+z3nRO9Jqnnh6ywvWThMcBh8vuIatrPg5yxDzWDXWwB/oy04xK9o pSpoHllAMp9cIh08m+3VOEXQqJyYnS+xQ7NCRI+hVQjmCJmRaIUZjaZNUvtXK9B+s1XLes jrtxYb359SIN5H/Q7BQrqevbvW+uSY0BUF/hrDX0qMfrUEeaAe6ZOvoW8sLU/Fcd4nFQfk jC6+yJCG3ftOxl8XFwBgpX58waRdk4hkmEW6bp4Y3E7/r9vMoEMZZu80RFIRgmQjc9q7E3 mru8h8JUEVPr61YereVh5iPVeK91/fsoqpgn81xfjTO5Uh1t6+2ZUKiVoaYzUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757114942; 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=n6Pzzt5F5fZS05TlJQgXiZ/i+yU0MyDbG1YsvqMVIsY=; b=lkyaFBDD/J/knD1wuJNon8r4b0LwgfQiqYKJHLK4sIATi+5mEOJm3ZvmHii/sBVtObPG7D J8O2dm2bCpqi9yILpL5EdJ4D7YB195g5HTbx02RfsoJyv6Kq7xTy04W3Mr1IRv5gFd+Nd3 3kTe4UmKcs5iVCv89sTB/akyGqX84TC86kf5peZ3MtNkE0chbMTSzWluWunoLSef/2Bq5z xnC1neiq4ha2xtXMHzX69JQFMC6UDvaaJ5tp7gj8akvL/huv1JkTfTISVr9KwnIW5nWzWr MpfoeNrhXuIyS4MbWB57uKqh8vbO5NBChKuP1FON4/2+JV1Ddys/3P1293mstA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757114942; a=rsa-sha256; cv=none; b=IbpGv2EC/Ncc8djhXigaeB13kFnLqoQnXoUFCZyKQpfkN2fKacbi4ZodpYONlI3oJ76hy5 Ys9JQ/a6noisJKEIBosjLWbp4h6IVQfImxpXXegrQCQMRsBPz1EnBfXNeG2/Q7KNgoXM2e thzpf3tJmEHw65wvsihrLdqFN00oeQrEedEBUpAQM91rtR86eDehOaEeo7nofpev3pNWAt YQEhnGmOOgX6++I6e/62lZTo4ljpPwB/MUHOpXZf4aIkYD11AgPunzzyBQZOKdG4GFdpDq fHhhps6A35oagW7y+oRW3a54CCP/p8/D/SpJmmlqdNsdEFjvLWBoWRSjyad+SA== 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 4cJXby31zVz17wV; Fri, 05 Sep 2025 23:29:02 +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 585NT2f3029294; Fri, 5 Sep 2025 23:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 585NT2ph029291; Fri, 5 Sep 2025 23:29:02 GMT (envelope-from git) Date: Fri, 5 Sep 2025 23:29:02 GMT Message-Id: <202509052329.585NT2ph029291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 81cb7c4c8e7b - main - LinuxKPI: rename from_timer() to timer_container_of() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81cb7c4c8e7bc4951c77fe64a63a847ed6abee38 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=81cb7c4c8e7bc4951c77fe64a63a847ed6abee38 commit 81cb7c4c8e7bc4951c77fe64a63a847ed6abee38 Author: Bjoern A. Zeeb AuthorDate: 2025-09-04 20:23:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-09-05 23:24:15 +0000 LinuxKPI: rename from_timer() to timer_container_of() With Linux 6.16 from_timer() got renamed to timer_container_of(); add the LINUXKPI_VERSION check with a default to the current version. Update all in-tree consumers (apart from wireless drivers managed otherwise). Sponsored by: The FreeBSD Foundation (initially) MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D52073 --- sys/compat/linuxkpi/common/include/linux/timer.h | 5 +++++ sys/compat/linuxkpi/common/src/linux_80211.c | 2 +- sys/dev/irdma/irdma_cm.c | 2 +- sys/dev/irdma/irdma_utils.c | 4 ++-- sys/dev/qat/qat_common/adf_gen4_timer.c | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/timer.h b/sys/compat/linuxkpi/common/include/linux/timer.h index a635f0faea59..bd06e3158fa3 100644 --- a/sys/compat/linuxkpi/common/include/linux/timer.h +++ b/sys/compat/linuxkpi/common/include/linux/timer.h @@ -49,8 +49,13 @@ extern unsigned long linux_timer_hz_mask; #define TIMER_IRQSAFE 0x0001 +#if defined(LINUXKPI_VERSION) && (LINUXKPI_VERSION < 61600) #define from_timer(var, arg, field) \ container_of(arg, typeof(*(var)), field) +#else +#define timer_container_of(var, arg, field) \ + container_of(arg, typeof(*(var)), field) +#endif #define timer_setup(timer, func, flags) do { \ CTASSERT(((flags) & ~TIMER_IRQSAFE) == 0); \ diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index f0881773726f..d00734001a59 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -7814,7 +7814,7 @@ lkpi_wiphy_delayed_work_timer(struct timer_list *tl) { struct wiphy_delayed_work *wdwk; - wdwk = from_timer(wdwk, tl, timer); + wdwk = timer_container_of(wdwk, tl, timer); wiphy_work_queue(wdwk->wiphy, &wdwk->work); } diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index 450fae662dd8..d4d4f328fb43 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -1316,7 +1316,7 @@ irdma_cm_timer_tick(struct timer_list *t) struct irdma_timer_entry *send_entry, *close_entry; struct list_head *list_core_temp; struct list_head *list_node; - struct irdma_cm_core *cm_core = from_timer(cm_core, t, tcp_timer); + struct irdma_cm_core *cm_core = timer_container_of(cm_core, t, tcp_timer); struct irdma_sc_vsi *vsi; u32 settimer = 0; unsigned long timetosend; diff --git a/sys/dev/irdma/irdma_utils.c b/sys/dev/irdma/irdma_utils.c index 5fc37022981f..038f1980082b 100644 --- a/sys/dev/irdma/irdma_utils.c +++ b/sys/dev/irdma/irdma_utils.c @@ -876,7 +876,7 @@ irdma_terminate_done(struct irdma_sc_qp *qp, int timeout_occurred) static void irdma_terminate_timeout(struct timer_list *t) { - struct irdma_qp *iwqp = from_timer(iwqp, t, terminate_timer); + struct irdma_qp *iwqp = timer_container_of(iwqp, t, terminate_timer); struct irdma_sc_qp *qp = &iwqp->sc_qp; irdma_terminate_done(qp, 1); @@ -1528,7 +1528,7 @@ static void irdma_hw_stats_timeout(struct timer_list *t) { struct irdma_vsi_pestat *pf_devstat = - from_timer(pf_devstat, t, stats_timer); + timer_container_of(pf_devstat, t, stats_timer); struct irdma_sc_vsi *sc_vsi = pf_devstat->vsi; if (sc_vsi->dev->hw_attrs.uk_attrs.hw_rev >= IRDMA_GEN_2) diff --git a/sys/dev/qat/qat_common/adf_gen4_timer.c b/sys/dev/qat/qat_common/adf_gen4_timer.c index 96b65cdff181..2c74d09418e5 100644 --- a/sys/dev/qat/qat_common/adf_gen4_timer.c +++ b/sys/dev/qat/qat_common/adf_gen4_timer.c @@ -57,7 +57,7 @@ end: static void timer_handler(struct timer_list *tl) { - struct adf_int_timer *int_timer = from_timer(int_timer, tl, timer); + struct adf_int_timer *int_timer = timer_container_of(int_timer, tl, timer); struct adf_accel_dev *accel_dev = int_timer->accel_dev; struct adf_hb_timer_data *hb_timer_data = NULL; u64 timeout_val = adf_get_next_timeout(int_timer->timeout_val);