From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2705522CBF1 for ; Wed, 5 Feb 2025 10:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752240; cv=none; b=NbKVbjxmk8bBxDsQ9++y7Kkes/D/SJVtbVkwhSdv6tycylbEBbrbD81NaYqrg5qcLsMMeGPNT/a5jNvNY4Ko3mSN5kiknr8df63ZP1AFIW7qUp/AmKefw51CEd1mn5uZ4x7JLzKNOu5hsGx7GKlykaC/eprnRU/HPIKxO89UZW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752240; c=relaxed/simple; bh=+JdS25xk+TqOfQJHkLDT0aZEdhXfu19wKe+qt+LGE3o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K4je/3Kb6ZFEl5n0u9vPcVLP75sqdG7xuiJIA0J5gEZ6wOFCyI8jNkZkTFw0R5SVMFgNULO8uj/dyUh3iC0s5BFyJLsdSFNnfUx9K/rDhLKJDRy7+1p8x0IvjdJb4XX/5rW9kYm5HVdJvkagEv7srd+PBLQpT1uxfpuV8S3tRbo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=tHKQBygT; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MFO20ue/; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="tHKQBygT"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MFO20ue/" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UujHhq6YPDPotMt/DdpLHs0nbxctZ3RHVGws7AIL4Tw=; b=tHKQBygTwdLu0Lq5EUJloPF9BuuoHBXM044qPqQyBdlAkxfwt89Udu8O89YxTyu8620PWi gr6xaWrkncfv8fpn9TaclLLTMFiEVTABXHsdJ1fGuOJWHm053Pth17l9f/Yu9LaFIxlmzF lAdBjtg3DuUml4kU+rHfdpdGoDD0z33Y7BcdHFLh5W8KSjGDC5yL8iTuZ3+zzZYyxEoiiW VogoTim++oMUsI8uOrkzhHj9gDN5oZxwW1hWvRI59APmie22lmVeVUXwr7SfIU2sO3z0Ry XoVZf+xIz2EypLAhC+DzHV2RHD8pqSZK+0nHH8yNrSAgg4KStUYf8QIdkW93oA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UujHhq6YPDPotMt/DdpLHs0nbxctZ3RHVGws7AIL4Tw=; b=MFO20ue/r9//pAnZM9IC5qcgdW+XArcRAepk4U96EJLir0xS1e5BM1akE6XgrRfFEyTZta BRyDsk2jx7RM9SBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 01/24] netdev: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:21 +0100 Message-Id: <861d9b287f2b5206b853dbcc0f302127f2a7f8ac.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- net/core/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index c0021cbd28fc..cae7fd3e5089 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6931,8 +6931,7 @@ void netif_napi_add_weight_locked(struct net_device *= dev, =20 INIT_LIST_HEAD(&napi->poll_list); INIT_HLIST_NODE(&napi->napi_hash_node); - hrtimer_init(&napi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED); - napi->timer.function =3D napi_watchdog; + hrtimer_setup(&napi->timer, napi_watchdog, CLOCK_MONOTONIC, HRTIMER_MODE_= REL_PINNED); init_gro_hash(napi); napi->skb =3D NULL; INIT_LIST_HEAD(&napi->rx_list); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8763522CBDA for ; Wed, 5 Feb 2025 10:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752241; cv=none; b=hVjdoPXlB+vKrLBGmafuj5gE/zW2JLteQkk/IUg79CiV3h6FcaWFIpKwU7zj5AqnBVW9y+71GT5ygjgwkwi1MvL1RzVyKxr/NtUNo3sREYXSKlvhBYQhu0q25EaJ1lE+urqnqoDpDjZ/SFxjVQSGkpM6vccHUzP47ET2t/81Fvw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752241; c=relaxed/simple; bh=xnXux1kGgJiIjn/ZHvkI/XAXEwhBlPi8SJkfUUC2Qk0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pNO044pkTxJwPDr+12KO2qpYotYHFpPusXHHp+sLeGLk7U1pJbxyZk72qXKUsBGEACqsWEyDXV9EZjh0wo6pmKV8YM+oejEtiI00RcY4xG+ymMIrf/aN+fznncToXxQFLJZRMInUWnJo3vNJAAVmpxbMPPITMvEpmnd6BmiHXZ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=e3NO/Sox; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0+mjZtOO; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="e3NO/Sox"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0+mjZtOO" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IvhKgvnTwEZUmN3ViXulBQzztoXq4tG/17TtF1y8bhk=; b=e3NO/SoxFW1J3U/7b3MV9JYEwF/48WUkuKkEIwceo1/gmEvy6mpqeuv7kfigTKJjD2QNz5 ifr6Qssazg08htFq0wy//MMuP1nGt+HuYp/cNVaf05gBtaxOAARcvs1+9TmXEyuUuoKGT8 GSU7pNqGqEdx+08gFudBYHsXVGH2fBeh5OzhO0sin6XHlUJiS1Uhy8lWFEciDUpa5xsf2A Ksdv/V2B0yVZTTOLl8JwxzdfMkHPgaTujuSLXZu7VnPYn4QgLjka6fEIjI+rdp5L6GMq8j WiwFAFgdheWJ1lSoNnWCDTQml7F1aycAD9i6k1aSrFUGBm6KTSHUM1ei7BLWzQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IvhKgvnTwEZUmN3ViXulBQzztoXq4tG/17TtF1y8bhk=; b=0+mjZtOO5QcarorAc/CYNwUCSugY4LnKvktsxZH2UH5QmodwCAMdKxUCjjrmbw6DYOtRy5 38clHDRPll/gY5BA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 02/24] net/sched: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:22 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- net/sched/act_gate.c | 3 +-- net/sched/sch_api.c | 3 +-- net/sched/sch_taprio.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/net/sched/act_gate.c b/net/sched/act_gate.c index 91c0ec729823..c1f75f272757 100644 --- a/net/sched/act_gate.c +++ b/net/sched/act_gate.c @@ -287,8 +287,7 @@ static void gate_setup_timer(struct tcf_gate *gact, u64= basetime, gact->param.tcfg_basetime =3D basetime; gact->param.tcfg_clockid =3D clockid; gact->tk_offset =3D tko; - hrtimer_init(&gact->hitimer, clockid, HRTIMER_MODE_ABS_SOFT); - gact->hitimer.function =3D gate_timer_func; + hrtimer_setup(&gact->hitimer, gate_timer_func, clockid, HRTIMER_MODE_ABS_= SOFT); } =20 static int tcf_gate_init(struct net *net, struct nlattr *nla, diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index e3e91cf867eb..6d85b342a857 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -619,8 +619,7 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtim= er *timer) void qdisc_watchdog_init_clockid(struct qdisc_watchdog *wd, struct Qdisc *= qdisc, clockid_t clockid) { - hrtimer_init(&wd->timer, clockid, HRTIMER_MODE_ABS_PINNED); - wd->timer.function =3D qdisc_watchdog; + hrtimer_setup(&wd->timer, qdisc_watchdog, clockid, HRTIMER_MODE_ABS_PINNE= D); wd->qdisc =3D qdisc; } EXPORT_SYMBOL(qdisc_watchdog_init_clockid); diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index a68e17891b0b..14021b812329 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -1932,8 +1932,7 @@ static int taprio_change(struct Qdisc *sch, struct nl= attr *opt, if (!TXTIME_ASSIST_IS_ENABLED(q->flags) && !FULL_OFFLOAD_IS_ENABLED(q->flags) && !hrtimer_active(&q->advance_timer)) { - hrtimer_init(&q->advance_timer, q->clockid, HRTIMER_MODE_ABS); - q->advance_timer.function =3D advance_sched; + hrtimer_setup(&q->advance_timer, advance_sched, q->clockid, HRTIMER_MODE= _ABS); } =20 err =3D taprio_get_start_time(sch, new_admin, &start); @@ -2056,8 +2055,7 @@ static int taprio_init(struct Qdisc *sch, struct nlat= tr *opt, =20 spin_lock_init(&q->current_entry_lock); =20 - hrtimer_init(&q->advance_timer, CLOCK_TAI, HRTIMER_MODE_ABS); - q->advance_timer.function =3D advance_sched; + hrtimer_setup(&q->advance_timer, advance_sched, CLOCK_TAI, HRTIMER_MODE_A= BS); =20 q->root =3D sch; =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 519E722CBF3 for ; Wed, 5 Feb 2025 10:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752242; cv=none; b=oULhMJB3SsnWBhNc0LmjCjetJe+5e6SYCWvoFqbgigHWgIq+bRN/+TkfAqT3OyIyDsgNlXmij9q7L0xEOFS/WOMWy7sA6jzofMrNv7GpFAjlK4hXC1TjgLoeqzBVQYYDRthpbISDNxiRPcjh9KJHJXADKB0eENPG3sWQ1uo8ulA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752242; c=relaxed/simple; bh=uarWz4KSbrYWFPZp9xzHJgg5bKqubxvpg5+6WKDWvac=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C8+QPqh7Rqng9oVMqtix8EhPVpoTeLcGWcYrE/RTqpyY+WKxDn4+4WQWwycVkon7i6cl5D+rd1c7GgFYIr6mN6002YbE/ymlCmNuerbIRE5dsF3rjVfIurgzDk40M9pj1+4QQfIZOmsnahZCOuLo1xwRYPlwdu8CyBh72sRd03s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=csy/eiPN; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=F8rRfihX; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="csy/eiPN"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="F8rRfihX" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Khragn3AIjYHvjej5Ja5Djv2dPm1xi0w8Hk1OR/WwmU=; b=csy/eiPNOGcmvPSL9y3KU0Tj05HraWeAr+OFCoq7PdO2ZICxUIEY+15T5x6IHSNz8Y6Uzj nxfxPAfkhc3dCtgzkNZXnp3JuSG4G7dC+U+swquYJRZf4SdT3I/7jX/c0w/2N4y7c1/pma jXwbhLdD6K6gRdv4Yugdjo39Jzzu3UWBYcIsVEloShcmGMAKo5l9sfuNWOyWihh3qTUhHk djN++9ENkgq2IUM1M4NLuBkEbbMk6muQVj+JhnTCSN5KpRKM9BwHR7AR+9fNLXkX2uZ6Va q+NxjJOFXLGNSAad1bEJaImQQ812+o7RBHjPaPIN5hC4Q+O63G3HOsgUJW7HEQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Khragn3AIjYHvjej5Ja5Djv2dPm1xi0w8Hk1OR/WwmU=; b=F8rRfihXOfR+KoKubZ7sv/0fPwQhM19LZ8kEM4A1+swJOkPivficZBzd20HRRm91PcwnWZ K/CM2DLpDlutkEAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 03/24] mac802154: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:23 +0100 Message-Id: <5a89d86092d11a1d0cdfdfaa33990aaf7f1eec87.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- net/mac802154/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac802154/main.c b/net/mac802154/main.c index 21b7c3b280b4..ea1efef3572a 100644 --- a/net/mac802154/main.c +++ b/net/mac802154/main.c @@ -213,8 +213,8 @@ int ieee802154_register_hw(struct ieee802154_hw *hw) goto out_wq; } =20 - hrtimer_init(&local->ifs_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - local->ifs_timer.function =3D ieee802154_xmit_ifs_timer; + hrtimer_setup(&local->ifs_timer, ieee802154_xmit_ifs_timer, CLOCK_MONOTON= IC, + HRTIMER_MODE_REL); =20 wpan_phy_set_dev(local->phy, local->hw.parent); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6516022CBF4 for ; Wed, 5 Feb 2025 10:44:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752241; cv=none; b=s5DzBE+iG2es3RAA8OnmIjdW+0QQyyCAcazCXEbYqPbn+tf6Ji4kdlWY44LEeXZXdga0YNSeDMJRqLBBd1+pvs3opfptvREv9mas2iwkj/Q2tIKRt60oGKJ9rd4JyPZSSYZgONT3iEPH024mzfO7dmGlW6g69fXFAhfOS2T+Cew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752241; c=relaxed/simple; bh=6sCJgvG7tZJmUd+2PnfjdU2N9mSb1iNsSFvFXCsfaBU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HxYgh0crsIrNhrcDJC8H9z2/XtMqeN0TM1sC0sjSPm4idNj6ccXEilhxZTELJ8l/PtqD9r2JN8Bc82lzHZLcYad0K61f10ImSOaX94t/JMUelt8mrqQ6dZ7S0oWqak6lzF/Ou8Z8jIfK0DMW3K4Y8CqsjQjSe39eOhqlwvdjrFc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bIVx7oKS; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=G3s2tQ3j; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bIVx7oKS"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="G3s2tQ3j" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0eQcZKQYBYXGRaHFwdEq4cJ9Sg3Z+taWpDdyrdREQug=; b=bIVx7oKSlzhSlwIGhQTvmKWDxnJKmftqUPqDzE+qHjg3ec0n+5tqPkTo+1wSb5jKHsJaEN 5sV/ASAHF62BrUjRrWMoQEqzX3iuIe2EADBMEi7VO4BXgH6hv5buOdzolMicOkOmg/fv9K tln88aH6lZ6Gp7nR6IWe12ckcRwoim8Vsr5R3w/RrgFdtFRJa3GYpcgrBFZv8M8LLW0nCV vhcHprH517X4vjCBKnucuJZZhCGzqLj2iIRyR9MxMka55oX6WUCRciNJANNbMMmJDUe7l/ g0sC0TTpX1uWPAc+28UtAyW9sr4pCxUilbeyA4eSHn44vvYegAkLoCiU3jJ/JQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0eQcZKQYBYXGRaHFwdEq4cJ9Sg3Z+taWpDdyrdREQug=; b=G3s2tQ3jWiIMoDps7TJe48oTI6YNqLk6mwIeBd7O/hpQ/rcHs8vCL79sQDkZqewoVHy4vg Kbr4uy9l3nmiXVBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 04/24] tcp: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:24 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- net/ipv4/tcp_timer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index b412ed88ccd9..e7a75afa995d 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -884,11 +884,9 @@ void tcp_init_xmit_timers(struct sock *sk) { inet_csk_init_xmit_timers(sk, &tcp_write_timer, &tcp_delack_timer, &tcp_keepalive_timer); - hrtimer_init(&tcp_sk(sk)->pacing_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_ABS_PINNED_SOFT); - tcp_sk(sk)->pacing_timer.function =3D tcp_pace_kick; + hrtimer_setup(&tcp_sk(sk)->pacing_timer, tcp_pace_kick, CLOCK_MONOTONIC, + HRTIMER_MODE_ABS_PINNED_SOFT); =20 - hrtimer_init(&tcp_sk(sk)->compressed_ack_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_PINNED_SOFT); - tcp_sk(sk)->compressed_ack_timer.function =3D tcp_compressed_ack_kick; + hrtimer_setup(&tcp_sk(sk)->compressed_ack_timer, tcp_compressed_ack_kick,= CLOCK_MONOTONIC, + HRTIMER_MODE_REL_PINNED_SOFT); } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70AF622D4E3 for ; Wed, 5 Feb 2025 10:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752244; cv=none; b=XyZii7BELrCzPHt4lwOCzagGDbxfIKuQVUtTLNxlqcQ96ePh+jm89gDGzjMCwIJgmd7CWWNhgnl3Xm4m08vsffVfsheZxfkBqoBxzYTg/wPmP6WpHxMW6jcBEonSBPfY2RE4gXwZ7wWKnzLEfitNqABIlp/oPPyELQGmUxxVVuo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752244; c=relaxed/simple; bh=Z/GBlEe99x0eYrCI5NcspUJh9vqNI4BOMKtDhh9RGsw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DJzV76Eomj0U/jvIIY1fIuNVnU4iXn5jLcai/AixOJeh0IEBo+Mp/JzuWbkpsswDNest4xKF3kPzC6rI6tHDnLtqmEiuMw+HGpFRUR/2Nrq8WUAKBv8qLbpp/vhltOfQKK09uzyn3LSWC5AwM1iuYE4YJRAgfA/M6QcbOQGj9q8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=icY5uib9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=q3kt3zD5; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="icY5uib9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="q3kt3zD5" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CCwyU1L7BPQVGFnF3IHYTdxsLytt07nkQHlLaVg8xEQ=; b=icY5uib9ebsNbQR4JdMf+Qze8o+/o36oiKAOSIzrN/2Yl0AHfvs/Tel4574RYNHTSuGyL2 4dX9QOy/PBV9XtnsIVIjCK3187MAui+ViGWlr2+gCwZWt8A7lcSd/smdMwA0WDNL0m9W1K Si7TXOH3IWbbMRqQmQVbMXcSr+k3zTWDlhaSndd+InDBODePNUn3RIHwAT2Ac76ciMQy7s xR0CW0Bzweeq+8YttMFyxYObMt/0SoGUBzYB6VNH6onmBLePrRFf9Q29hrYC5kXREpdaGn S0Hbx8puTDJsBlFzfy9X6wR6QmznJbrqbYRjm8uYp2q8uNbphf23StJ38BZ3GA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CCwyU1L7BPQVGFnF3IHYTdxsLytt07nkQHlLaVg8xEQ=; b=q3kt3zD59WbaO9/g678oOTvv3zftxVkW2TxcsfR31AYGyptiay8Sd0C1SGFWatDR7fATj/ nWN51+x9oCRvWdAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Marc Kleine-Budde , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 05/24] can: m_can: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:25 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Reviewed-by: Marc Kleine-Budde Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/can/m_can/m_can.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index d025d4163fd1..884a6352c42b 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2420,12 +2420,11 @@ int m_can_class_register(struct m_can_classdev *cde= v) =20 if (!cdev->net->irq) { dev_dbg(cdev->dev, "Polling enabled, initialize hrtimer"); - hrtimer_init(&cdev->hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_PINNED); - cdev->hrtimer.function =3D &hrtimer_callback; + hrtimer_setup(&cdev->hrtimer, &hrtimer_callback, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_PINNED); } else { - hrtimer_init(&cdev->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - cdev->hrtimer.function =3D m_can_coalescing_timer; + hrtimer_setup(&cdev->hrtimer, m_can_coalescing_timer, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); } =20 ret =3D m_can_dev_setup(cdev); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E6F222D4D7 for ; Wed, 5 Feb 2025 10:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752243; cv=none; b=jZ6SlpPhwE8IrJ0dktkHcK/vYCxPR7qqffDzcVNcEGTghmsv/iTrFBl+iifl9LjAR+27U9v0o/0FvmyjYMtxtwrwpewn6WmL1XsfU9zEyKz6H7iNBCX3CvTZuBUCfup5YuE8nPgz8YWvGULF9YlCrMUlRAKOVBdMg6ZuN+a5XzQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752243; c=relaxed/simple; bh=yqFgXdoIeGEn2fnEns19b+NrMl58lhXFt6MI2Fxf85A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KFv/l3E7jyvPAdVX/PcH5wo0FSPSYOOpPQOr791M8fHIsJ5wKZ2FKnv5gjtl+i9dhJjDYS6xFWbhJ55VOZJde9hpCKPX5Gss1M3jqrkqhrnK/HsaQ2PtpP1hWg6ydZ6zuv6J1t/937xGs4VeBKWiOJ91+nQC0vHMDa+Ska8dXk8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ac07Paku; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6LlfTrKi; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ac07Paku"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6LlfTrKi" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DEq6TYs97jrhDpTwX+GEUbWawU96CdQbcAH0e1yZZ8E=; b=ac07Pakup3XMtv2efgqatK0ZG7OaPY3djyClir4cEF9u1iOowRmRGBZ5LybSJZRpB6m5Tl UtkoIhbPdEtB6ul2vSHwIbtAYDSNmB/YAnLH8Jbf0Bme+OOfOCoLb5CuueI/zy6lGyM0Ww MjVvPaCUG7+CfefvbeiPQlewuis1k6uwBoNh8V/UC5/OTfJoH+O8OiTDl7Pd5rjHuKU5pk x6FYZpYY0AbKq1LchL3hJ1wuKzE9730P9CpLZe9lu3ulD1hxIFXGwQkfYYVtCBzWvhKDtL oOlsQb8S5LbhN2ckJaxEweEmJgCyMp+RoCB4LAIW/BYXOHr7JfVLEPlCcCnWtA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DEq6TYs97jrhDpTwX+GEUbWawU96CdQbcAH0e1yZZ8E=; b=6LlfTrKiktN0Kkl92ilKj9oqNZpnLvKTuMUUPGc21X2XGZw3oDljceinyW+wWej3qgppXa ZF6qaFhWW5Mf9DCw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Marc Kleine-Budde , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 06/24] can: mcp251xfd: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:26 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Reviewed-by: Marc Kleine-Budde Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c b/drivers/net/c= an/spi/mcp251xfd/mcp251xfd-ring.c index 7209a831f0f2..c34f2067a989 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c @@ -541,11 +541,11 @@ int mcp251xfd_ring_alloc(struct mcp251xfd_priv *priv) } priv->rx_ring_num =3D i; =20 - hrtimer_init(&priv->rx_irq_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - priv->rx_irq_timer.function =3D mcp251xfd_rx_irq_timer; + hrtimer_setup(&priv->rx_irq_timer, mcp251xfd_rx_irq_timer, CLOCK_MONOTONI= C, + HRTIMER_MODE_REL); =20 - hrtimer_init(&priv->tx_irq_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - priv->tx_irq_timer.function =3D mcp251xfd_tx_irq_timer; + hrtimer_setup(&priv->tx_irq_timer, mcp251xfd_tx_irq_timer, CLOCK_MONOTONI= C, + HRTIMER_MODE_REL); =20 return 0; } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FEA122D4DA for ; Wed, 5 Feb 2025 10:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752244; cv=none; b=UNcqZQYhAQOceJOO8Er0PG7yU7SENF+mtwSnn8r3wZpGIM0vQsQUPRZMP1/VPBxMMHYqDVPB4sghdR9nXInDEnSDBW5+0l4mHle+3OBrh+GV8oD5v4qhaEr/o4UI26fpTrI4GbvC3J051BXJb3eNlvLlG3hREScB+qbcbcs3oJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752244; c=relaxed/simple; bh=XE70HxG67IlkX48CTskscYfrE2bRx5bl3ZYJplRPy9g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oURe7kFLo4G1Y4jmAquz2lzenl+ntEwXifmj18cnacnOO0/b6M1Xkk5zsYu99KryQR2LsTfHbDqZ+Sb5Jep+aA+oICK+QTRsDYDXLVCSrjBGcTIJoOZLpdTO6FToolaDyM7pzjO5NsRQGfQxy+DRAccKeozEOQwW4Kx0U1636eI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Q54vI15a; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yS7B4AY+; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Q54vI15a"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yS7B4AY+" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O39YmRKm9gdAC27GK5e9vDarkb96t0m+oW8rCAxeFfU=; b=Q54vI15aReIYxfTi+KjpqeDqc5x03prprYjTvVbSdPwMjMF32hSlzDmBB6QIMvnEIyNUmx fEmQ05N/V2Xb0gOKgc/A0EeXF26AlfoOBFBVQ41taWMLGU/pIm1h/RBsGR5uxINkgEtZCu F4p1ef9N64I0X1+kDIhle2pvRdPt3QiOT8a+MO4ADfSo3m63HKBUsSGfXRePYNPiy9YR0B vCjA9CMf4bzJDJqA8xmcabkCwOmZ0UZTAZnseoYYLDPkaW79/h/zqw6Lw9tu0tAv6m0Mug s4b/BT89I/cbuOYA91ShnbMf/3veefJs5wvSUN+71C8WEmeQX2qFJoAQoZIeuw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O39YmRKm9gdAC27GK5e9vDarkb96t0m+oW8rCAxeFfU=; b=yS7B4AY+NjwI3zPbWYA32j4gt6huj4SO79T40mVZI2mWBdUGKHJ2jQSAtrK3t++zN3FXvl dGWFu1fUAtmJ6BDw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Marc Kleine-Budde , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 07/24] can: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:27 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Most of this patch is generated by Coccinelle. Except for the TX thrtimer in bcm_tx_setup() because this timer is not used and the callback function is never set. For this particular case, set the callback to hrtimer_dummy_timeout() Reviewed-by: Marc Kleine-Budde Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- v2: - Use hrtimer_dummy_timeout() for bcm TX thrtimer --- include/linux/hrtimer.h | 5 +++++ kernel/time/hrtimer.c | 5 ----- net/can/bcm.c | 20 ++++++++------------ net/can/isotp.c | 10 ++++------ net/can/j1939/bus.c | 4 ++-- net/can/j1939/transport.c | 8 ++------ 6 files changed, 21 insertions(+), 31 deletions(-) diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index f7bfdcf0dda3..acae379541c5 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -223,6 +223,11 @@ static inline void hrtimer_cancel_wait_running(struct = hrtimer *timer) } #endif =20 +static inline enum hrtimer_restart hrtimer_dummy_timeout(struct hrtimer *u= nused) +{ + return HRTIMER_NORESTART; +} + /* Exported timer functions: */ =20 /* Initialize timers: */ diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index deb1aa32814e..47df6f50e12c 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1597,11 +1597,6 @@ static inline int hrtimer_clockid_to_base(clockid_t = clock_id) return HRTIMER_BASE_MONOTONIC; } =20 -static enum hrtimer_restart hrtimer_dummy_timeout(struct hrtimer *unused) -{ - return HRTIMER_NORESTART; -} - static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, enum hrtimer_mode mode) { diff --git a/net/can/bcm.c b/net/can/bcm.c index 217049fa496e..526cb6cd901f 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -1011,13 +1011,12 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_he= ad, struct msghdr *msg, op->ifindex =3D ifindex; =20 /* initialize uninitialized (kzalloc) structure */ - hrtimer_init(&op->timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_SOFT); - op->timer.function =3D bcm_tx_timeout_handler; + hrtimer_setup(&op->timer, bcm_tx_timeout_handler, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_SOFT); =20 /* currently unused in tx_ops */ - hrtimer_init(&op->thrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_SOFT); + hrtimer_setup(&op->thrtimer, hrtimer_dummy_timeout, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_SOFT); =20 /* add this bcm_op to the list of the tx_ops */ list_add(&op->list, &bo->tx_ops); @@ -1192,13 +1191,10 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_he= ad, struct msghdr *msg, op->rx_ifindex =3D ifindex; =20 /* initialize uninitialized (kzalloc) structure */ - hrtimer_init(&op->timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_SOFT); - op->timer.function =3D bcm_rx_timeout_handler; - - hrtimer_init(&op->thrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_SOFT); - op->thrtimer.function =3D bcm_rx_thr_handler; + hrtimer_setup(&op->timer, bcm_rx_timeout_handler, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_SOFT); + hrtimer_setup(&op->thrtimer, bcm_rx_thr_handler, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_SOFT); =20 /* add this bcm_op to the list of the rx_ops */ list_add(&op->list, &bo->rx_ops); diff --git a/net/can/isotp.c b/net/can/isotp.c index 16046931542a..442c343afe1f 100644 --- a/net/can/isotp.c +++ b/net/can/isotp.c @@ -1634,12 +1634,10 @@ static int isotp_init(struct sock *sk) so->rx.buflen =3D ARRAY_SIZE(so->rx.sbuf); so->tx.buflen =3D ARRAY_SIZE(so->tx.sbuf); =20 - hrtimer_init(&so->rxtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); - so->rxtimer.function =3D isotp_rx_timer_handler; - hrtimer_init(&so->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); - so->txtimer.function =3D isotp_tx_timer_handler; - hrtimer_init(&so->txfrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); - so->txfrtimer.function =3D isotp_txfr_timer_handler; + hrtimer_setup(&so->rxtimer, isotp_rx_timer_handler, CLOCK_MONOTONIC, HRTI= MER_MODE_REL_SOFT); + hrtimer_setup(&so->txtimer, isotp_tx_timer_handler, CLOCK_MONOTONIC, HRTI= MER_MODE_REL_SOFT); + hrtimer_setup(&so->txfrtimer, isotp_txfr_timer_handler, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_SOFT); =20 init_waitqueue_head(&so->wait); spin_lock_init(&so->rx_lock); diff --git a/net/can/j1939/bus.c b/net/can/j1939/bus.c index 486687901602..39844f14eed8 100644 --- a/net/can/j1939/bus.c +++ b/net/can/j1939/bus.c @@ -158,8 +158,8 @@ struct j1939_ecu *j1939_ecu_create_locked(struct j1939_= priv *priv, name_t name) ecu->addr =3D J1939_IDLE_ADDR; ecu->name =3D name; =20 - hrtimer_init(&ecu->ac_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); - ecu->ac_timer.function =3D j1939_ecu_timer_handler; + hrtimer_setup(&ecu->ac_timer, j1939_ecu_timer_handler, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_SOFT); INIT_LIST_HEAD(&ecu->list); =20 j1939_priv_get(priv); diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c index 95f7a7e65a73..a0d350871745 100644 --- a/net/can/j1939/transport.c +++ b/net/can/j1939/transport.c @@ -1510,12 +1510,8 @@ static struct j1939_session *j1939_session_new(struc= t j1939_priv *priv, skcb =3D j1939_skb_to_cb(skb); memcpy(&session->skcb, skcb, sizeof(session->skcb)); =20 - hrtimer_init(&session->txtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_SOFT); - session->txtimer.function =3D j1939_tp_txtimer; - hrtimer_init(&session->rxtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_SOFT); - session->rxtimer.function =3D j1939_tp_rxtimer; + hrtimer_setup(&session->txtimer, j1939_tp_txtimer, CLOCK_MONOTONIC, HRTIM= ER_MODE_REL_SOFT); + hrtimer_setup(&session->rxtimer, j1939_tp_rxtimer, CLOCK_MONOTONIC, HRTIM= ER_MODE_REL_SOFT); =20 netdev_dbg(priv->ndev, "%s: 0x%p: sa: %02x, da: %02x\n", __func__, session, skcb->addr.sa, skcb->addr.da); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70A4E22D4E1 for ; Wed, 5 Feb 2025 10:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752245; cv=none; b=sPZD7AgwzHFTV/lqNyV1bR5UggsrAT/iy1Ixk+FarFbDW8HJ3S+TQ/TEA9ofb0xRUkgarnO4lIh0PHGtV+6GScKnf4e2JPLPdPUCP2gFrzRRid28njNPXkRltohbPrBYKLihNU1qeFtnN96uco2fXQCkJQvogV4RkXHZO+zJoos= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752245; c=relaxed/simple; bh=3MCkUp4GcywPXVI0Z7DvgOiljVL7mfG2UeO4+a77KjM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bkgq2amuCVqgJNm0J2F3AFhuNqKD/COXcb5DXv7cENM92q45pVlrjL4mCGZ1DA2VvGnfoa1HMuwGj8VOhpRlijkoDrlRMEGBL7QNiRg4pr5jbpV6mIn9sS0ye3PZAdA62SiKlQxtzULStJaMI205zVaPUzpvZrKB/SB9WWfeJWQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=I5pJH0oF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UcjwB8M0; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="I5pJH0oF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UcjwB8M0" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rw2+KOHKcdJjOsWW3hOAYLU7gY9ICDPP1Zj0SZUVHk8=; b=I5pJH0oFHLHFzJPSsScNGQHxzYfnH6kZdsntF7QQ3+q+TO+BxKdE1EOCZZluMIaa6HMf1C hea0YBA3MssGO100g4yBpvM22uV745iOdtU4pmb/uz7IG34J+n5+KApk04qKwVqxePijBm JvZWZ/pw+dGkHFphufW/5Q2Kngfb4rnvfWxD0PHoFf5s8oh29P5xY5bDjKeSfHUmOWxUhf c5mroUb6VbgyjnErdNGtaYWe5LtA4lkwBJpYdkAnyUm7XaI5oJ4hET7g80OMUkiCB6KemT JRmTh1gv3iaPlTEMyaFFLZGxDIg63ks01y7vUvA2jZeZ3E4y+Vku0kXZCbnNGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rw2+KOHKcdJjOsWW3hOAYLU7gY9ICDPP1Zj0SZUVHk8=; b=UcjwB8M0FVzQghAsoZSJ3LMl7YP/xRPBoCIIhOoCc3eHAzUdLj86/gM78niUPdL3bJBd4+ ukiR7VGSQRB2wmBg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 08/24] net: ethernet: ti: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:28 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 9 ++++----- drivers/net/ethernet/ti/icssg/icssg_common.c | 5 ++--- drivers/net/ethernet/ti/icssg/icssg_prueth.c | 5 ++--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/etherne= t/ti/am65-cpsw-nuss.c index b663271e79f7..bf2d51ecd50e 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -2299,8 +2299,8 @@ static int am65_cpsw_nuss_ndev_add_tx_napi(struct am6= 5_cpsw_common *common) for (i =3D 0; i < common->tx_ch_num; i++) { struct am65_cpsw_tx_chn *tx_chn =3D &common->tx_chns[i]; =20 - hrtimer_init(&tx_chn->tx_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINN= ED); - tx_chn->tx_hrtimer.function =3D &am65_cpsw_nuss_tx_timer_callback; + hrtimer_setup(&tx_chn->tx_hrtimer, &am65_cpsw_nuss_tx_timer_callback, + CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED); =20 ret =3D devm_request_irq(dev, tx_chn->irq, am65_cpsw_nuss_tx_irq, @@ -2553,9 +2553,8 @@ static int am65_cpsw_nuss_init_rx_chns(struct am65_cp= sw_common *common) snprintf(flow->name, sizeof(flow->name), "%s-rx%d", dev_name(dev), i); - hrtimer_init(&flow->rx_hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_PINNED); - flow->rx_hrtimer.function =3D &am65_cpsw_nuss_rx_timer_callback; + hrtimer_setup(&flow->rx_hrtimer, &am65_cpsw_nuss_rx_timer_callback, CLOC= K_MONOTONIC, + HRTIMER_MODE_REL_PINNED); =20 ret =3D devm_request_irq(dev, flow->irq, am65_cpsw_nuss_rx_irq, diff --git a/drivers/net/ethernet/ti/icssg/icssg_common.c b/drivers/net/eth= ernet/ti/icssg/icssg_common.c index 74f0f200a89d..6c1b8ff563e0 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_common.c +++ b/drivers/net/ethernet/ti/icssg/icssg_common.c @@ -249,9 +249,8 @@ int prueth_ndev_add_tx_napi(struct prueth_emac *emac) struct prueth_tx_chn *tx_chn =3D &emac->tx_chns[i]; =20 netif_napi_add_tx(emac->ndev, &tx_chn->napi_tx, emac_napi_tx_poll); - hrtimer_init(&tx_chn->tx_hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_PINNED); - tx_chn->tx_hrtimer.function =3D &emac_tx_timer_callback; + hrtimer_setup(&tx_chn->tx_hrtimer, &emac_tx_timer_callback, CLOCK_MONOTO= NIC, + HRTIMER_MODE_REL_PINNED); ret =3D request_irq(tx_chn->irq, prueth_tx_irq, IRQF_TRIGGER_HIGH, tx_chn->name, tx_chn); diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/eth= ernet/ti/icssg/icssg_prueth.c index 00ed97860547..d3bdde6bd3aa 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c @@ -1169,9 +1169,8 @@ static int prueth_netdev_init(struct prueth *prueth, ndev->hw_features |=3D NETIF_PRUETH_HSR_OFFLOAD_FEATURES; =20 netif_napi_add(ndev, &emac->napi_rx, icssg_napi_rx_poll); - hrtimer_init(&emac->rx_hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_PINNED); - emac->rx_hrtimer.function =3D &emac_rx_timer_callback; + hrtimer_setup(&emac->rx_hrtimer, &emac_rx_timer_callback, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_PINNED); prueth->emac[mac] =3D emac; =20 return 0; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D941722CBFA for ; Wed, 5 Feb 2025 10:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752244; cv=none; b=fAaZLnxODho0Va5aPd7UehGPSratbHo2TkyVbz5sA/sCR+4EWFVnS+zaVn/wNXJToS8ZxY20dtACDTvWTZiWRI3S3CzGdXAps7Zkg2g3M+q5m4ZDEh+9GHGQppNEwiLqEUWGN0vDJDK8DnWKkqz8Nx/ouMkY0uj3eCrz85MGDAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752244; c=relaxed/simple; bh=blqJcxnKg91LnxCDkdxlfYSVX/zKY1PoB7+5I7BbB9w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DYjKa6WYgXec54tWzOepTQd+A+wsWurDGOSC4I7sGzmXl/rpMfcOWGBAlBMSeGm4IrmK2CA5Y3Z0Cq7l+nr3OFyWt63RQIuXKTSsJvLRBLWCxKCZ6ByX1JJkI4cO0t3aO7s0AWNwuHuDOBcjFTfGqSZIdYJCWY7UUtnYkDBBktY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=11U/V/OT; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=kNX80ONb; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="11U/V/OT"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kNX80ONb" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pB915+mRW6G1JuwVlEatRyv58a5CfnimTW+NxxsnfcI=; b=11U/V/OT2E5+MJBFmmYRfGWtXA7HZVE9h6ckCd2vw2VIlrk02jzxHlh/zcJMP2K16MvbOF MIpgQsCW1bNk+aqkoFvrq/jeKV3L1oZ0nkrh8cHqM9nBuzQSuTVzn+xyzUCVoVj9LjLAUW myvglLi/xM9gdRPkpzG39ERRA1CWivuOjexvKfWufca86FioStMpwo46pDd3wVXdm3qAZJ sEazul9eJEHeBUjONyTMuQOmx94q1PwsrMSGHpd/rK9EJkewgdKkACdbByi9Hv4g3255IN yp0VFjQbUdgkwshgC0yUoF5HseZS2mgEUsW9ifM90/xEDecNNpIvFuUnXsMmlQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pB915+mRW6G1JuwVlEatRyv58a5CfnimTW+NxxsnfcI=; b=kNX80ONbo+lhShVXI9LpmvhBHhjAwBO8KpOdngAf1F0R4xDUkN0We4SHl+X/rM9snutYw5 IHFm2Gp09S+maYCg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 09/24] net: ethernet: cortina: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:29 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/cortina/gemini.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/c= ortina/gemini.c index 991e3839858b..2b4bb74f21bf 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -1833,9 +1833,8 @@ static int gmac_open(struct net_device *netdev) gmac_enable_tx_rx(netdev); netif_tx_start_all_queues(netdev); =20 - hrtimer_init(&port->rx_coalesce_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - port->rx_coalesce_timer.function =3D &gmac_coalesce_delay_expired; + hrtimer_setup(&port->rx_coalesce_timer, &gmac_coalesce_delay_expired, CLO= CK_MONOTONIC, + HRTIMER_MODE_REL); =20 netdev_dbg(netdev, "opened\n"); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D89D22D4E4 for ; Wed, 5 Feb 2025 10:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752244; cv=none; b=s7s2fHSWgee3TklOIcHZDQGvjSVsZndscVRu/z2MpiTW7vrDa9qGWHiM/4+RnPSkTaP06ttrR+RpabLzpjHRNYRDomaYbFREfcD3eQnxG79RaYF0Xga3EYbDsm+eZ3L1SzA3rd8j3fvSF9769rfxestJ7xxgifnbdEOJBTU8zIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752244; c=relaxed/simple; bh=bWAmgvL8Q34pHHBcCoZLxSJ/TleZDA4YnIXa8s01Rlg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OaONUJNxRZG4wgyrfn+HF4ETarRiYkNUXLj9rXa9YcvvoIOzYJTqbJL2aQ7scSRIBJuMBYwhw32k18ouTlsGyAa/uA8gZHSP9t4YOtax1O1uZ3W5oa1NnDI1QD9P9cQFK9ZqN3wDW2K4Y8RUd+y30D9quNbDCxnpoGrfaCyzqEY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=OdwENkv3; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rI4TChHn; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OdwENkv3"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rI4TChHn" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r7+l+bSFOf1AIAubKWoKxwbu1mYKkSTXIgD44N7Bug8=; b=OdwENkv3EdJfDwbCfgi3CMLKPEWqOCCyvrUEevj3kvFn8smJNUXGm7fwMzfhDcGLfTc7qc 436226HBvnkT4ZlTxCMBFSzqbfJxHqsSWKeYUeS4KQq7120+a4s5UCpL5WYElEfKMrOMOE pOt9LK/8HXYk++Xi//WWekBZJKl0p4bwhWSs4iLpfo+y8tcHr+RkFpn5WQ+RNhkJy/EIYe zI9mVRzKSW3LUUmg4n9zfq158Nd6q9XqddETkzfjJgAfCr0Yec9/KQYOH6GTf+i1TRqfkR Waqn8vVnnSa/U1imupcI6FaPKIKwFcyr6XDh/gC481ktcea+vvQr7qMjvKvKiA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r7+l+bSFOf1AIAubKWoKxwbu1mYKkSTXIgD44N7Bug8=; b=rI4TChHntH8OH2NtaREpnPCUU9f0aEugIJmXREgQTvd481fAOOdcNx0d78Qpz5y4hZqIfC x2Yn8Yd7Xi6CMiDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 10/24] net: ethernet: ec_bhf: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:30 +0100 Message-Id: <2d8fcf9bf83af507f1ca25cb068af2ac32cdcb2c.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/ec_bhf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ec_bhf.c b/drivers/net/ethernet/ec_bhf.c index 44af1d13d931..67275aa4f65b 100644 --- a/drivers/net/ethernet/ec_bhf.c +++ b/drivers/net/ethernet/ec_bhf.c @@ -416,8 +416,7 @@ static int ec_bhf_open(struct net_device *net_dev) =20 netif_start_queue(net_dev); =20 - hrtimer_init(&priv->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - priv->hrtimer.function =3D ec_bhf_timer_fun; + hrtimer_setup(&priv->hrtimer, ec_bhf_timer_fun, CLOCK_MONOTONIC, HRTIMER_= MODE_REL); hrtimer_start(&priv->hrtimer, polling_frequency, HRTIMER_MODE_REL); =20 return 0; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B430822DF93 for ; Wed, 5 Feb 2025 10:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752245; cv=none; b=csAumsUrkpRbiOMajyfP5p7jSgz5L1EP57D26OmcuC1ZReli0a8hUnx70GfER2Giqn7jdugPahmN1GjxViqXlVfse9/tj9DS/NgK/QglXYy9I3cX5Jz7G1I0n8EB5zlYd4cbAloPN3iePMIb+LfX+DxnPdsVZX8AlRvY5lTFpuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752245; c=relaxed/simple; bh=WB7Sz4ejRDVueHNK+tC3/5MoEvrbKEvZjeDu2iFiqvg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RJ9mP2QJYOgyrsDS4An/j0J4y9CQPMwDQrRBG932Ts2oHex+AF/1b39gGxdIxqgegPR2pCmPvbfTl3qAKdRkn7hmFunQHtaDmZNV+n85G0+t5lWJm8YpS98PkpHuJDmqlhj/BsL80iot3KZaGoCtXqbDItcyF4sC5be1MyLmYP4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=beRbNNTb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=7FMOjote; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="beRbNNTb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="7FMOjote" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kXbEjIfblj0q6q8IAyE5cVLoy2zVe2T6ldPU/EDiUms=; b=beRbNNTbI9y94ovgkDcQznY5hDD+hB2VxU9ePN0Lfx+ta7ackCcCwZdUfsmIyRzjA9O1pJ aytAz/TgtEE5GsXBCTAcwtVJhGNQ1w2UZNXfAi7nEFXL7L+bD+f6nVmAHuEaRLEG21teZC xEipW5YrrMaj1NoarvyDfus+uuHxawrEc5GuGe/JCNHF96aFAJtHLeZF/CO2adMCIi3zn6 Bw1vY5T8w2r2UybIIlq0gZReJ2S4tqwBqDKcVbGtO/OzAviDnkDftTXilyHrPiSWL7yzcO 7nDD+1oyXLclxJ+LHBMBUq/+7QHtcBsMTPA/U1SKn3u46rSxuXDtme0xD6Wi8g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kXbEjIfblj0q6q8IAyE5cVLoy2zVe2T6ldPU/EDiUms=; b=7FMOjoterwVhDHroJ4uQSSUUf0qUaLvU/VlQreeLcCpHJSOoAnBzFy3njsPU8UBdsJfIqq q3YXSe6MqIwsBhAA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 11/24] net: ethernet: hisilicon: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:31 +0100 Message-Id: <11f5140e157cc0cd02a715f531217b021743aa71.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/hisilicon/hip04_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ether= net/hisilicon/hip04_eth.c index a376d4bdf281..18376bcc718a 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -934,8 +934,6 @@ static int hip04_mac_probe(struct platform_device *pdev) priv->chan =3D arg.args[1] * RX_DESC_NUM; priv->group =3D arg.args[2]; =20 - hrtimer_init(&priv->tx_coalesce_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - /* BQL will try to keep the TX queue as short as possible, but it can't * be faster than tx_coalesce_usecs, so we need a fast timeout here, * but also long enough to gather up enough frames to ensure we don't @@ -944,7 +942,7 @@ static int hip04_mac_probe(struct platform_device *pdev) */ priv->tx_coalesce_frames =3D TX_DESC_NUM * 3 / 4; priv->tx_coalesce_usecs =3D 200; - priv->tx_coalesce_timer.function =3D tx_done; + hrtimer_setup(&priv->tx_coalesce_timer, tx_done, CLOCK_MONOTONIC, HRTIMER= _MODE_REL); =20 priv->map =3D syscon_node_to_regmap(arg.np); of_node_put(arg.np); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B429122DF92 for ; Wed, 5 Feb 2025 10:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752245; cv=none; b=qWfyJD9cB+OMotYo6CmIQ/Z8iuReu2w2BdQwLxMWrhMIrvlfYnK9GQxnenXKsIJf8vtFVe+aoRgF1bgU43NIGdPOSor0u/0KFy9PpIa4QL5Jqy1wbrkwrBtvgVir7Oi6Uzec7xwlv67fHeeURD7EFcTqimFASEo6v11Ff3u9I3I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752245; c=relaxed/simple; bh=h0K6bmCS4q1BCFQok2IBhMbBrrfdAwg3rxMcmrQfzTw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=V0pSvW3+umnOpnCYh3SJFRGESJSy+OBwKKmS+rFtl5kIwSliMHsmQf2HBHLZIznFN8+b+FTuF5DEa5nlYUI68pCp/yMf7RwYJwbzuaZ88XaZ08bRmtMQj5VOFvukdwzJy3dRvsyLwcecY749l+su+uVmd8lnGEAqjPbJFCdio6o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=kDrRc/Eh; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+ZBVEG49; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kDrRc/Eh"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+ZBVEG49" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EgglCJ8InglBHTkmeAtwEjBiFRG6MBIw9I+Lo8fY/Ng=; b=kDrRc/EhphAtHESQ9OkritBSFsoM66dpAO0u7MgjyMG6adhKM0vlTP4JrkA2lXzkCLKvDO s2yoptTAsQ5zT/gnSk7QgytH7yYHGUGe7eHLfKu0w+p5in+svCLR2Tj/cH3Zdo030yIqTx A3qBDdK0p8rNt43xk+06lu1wAKlSMiDDhNMcx+QWIPnQOjCvslpO4fFBF4kITfzek7FC3l Vu/BCx3VxN27L2/VOyWwZHfC7FGNR/qPeUZWswl1ELEVX2PxSVRA0fTc9ck4Tpb/GMu7Ol Vqm72891hHwl2UACuU8l5n+QRyJuQYxegZlAuOiTcDciwwkZwsOLfOK92CnIbw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EgglCJ8InglBHTkmeAtwEjBiFRG6MBIw9I+Lo8fY/Ng=; b=+ZBVEG49WUxOuH7aAfKA52bpC83Lyz2sHGMtFs2qRJcMApHblZt6c7sFvg8Gn8IdQMZcYe 4j6F2MzVEYerdCBg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 12/24] net: sparx5: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:32 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/microchip/sparx5/sparx5_packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c b/driver= s/net/ethernet/microchip/sparx5/sparx5_packet.c index 138ac58fae51..f713656f1fae 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c @@ -375,6 +375,6 @@ irqreturn_t sparx5_xtr_handler(int irq, void *_sparx5) =20 void sparx5_port_inj_timer_setup(struct sparx5_port *port) { - hrtimer_init(&port->inj_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - port->inj_timer.function =3D sparx5_injection_timeout; + hrtimer_setup(&port->inj_timer, sparx5_injection_timeout, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA18022E3E7 for ; Wed, 5 Feb 2025 10:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752246; cv=none; b=BR8xQMokKfgemOTzxXpSNU9NOj0eiPloVu/KhE01268uhgg3qTJuLLrQHlbxlZ7JJMRs4VIYCw62Jk/5TyFvOZ7kkgWKhVKGHaxlGK5TT6J6mSwSqMmWTcgrTJnfEEAFzLpE4FJwqBYifPuSth+bIuQ2D91KN9/UhI9IqOuuvG0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752246; c=relaxed/simple; bh=k6FJM8A7IZMjnAHkGmzy5gyKoGKw+ALfkcMEcY2Dwc8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Sbe7wqxe9y/9/KMX1DzPBXeAYxEMd34LqD6WmFm4v4GWzLnadbOO0CNtgvN3vZGi4aPOWBp1q2aGTGi2Zk5YWLA8UJNSCQwPobk0qmnJAkefr7m2ufsVdHPoR3RIzu9rCpvwDZPtKfAHisX27eqsDSLYjxWaeeOV97gk8J4pmB4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jiWC+f/N; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=RC0MocB1; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jiWC+f/N"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="RC0MocB1" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sezEbb7+sY5/PrxDb1jUkphwMQV7ifxmPKrPGiY0mkA=; b=jiWC+f/N5NJV3cmrKir5cyB+vKNZE73gyu9RPD/i57QFQMEGnfnx7TUaze9f9LJb2eIgMI Uujv9VpJS7n8YwbmiaqmELPqBiYwtPvqglIFOtO950gBpHx/EgJw04930EF1hytqAQggFW Gix4s5g4kzflyTROZRxLjm0k45xvyOqVaIIuG8JTJ0A9GlNTDrvf8TtLNgeCRi4EB51iHY nA1qH0rOFvVwRekS5XzoshjaMZPqbqqDPNW5gSuX0sWOC8Tffa7zWoyLgsJJJcRlCLuu7F huaGeDdzdBIk4L7wV6qkNFFbol1R+RvQayuubjFmIJpoSvroirBeA8yI+8D88g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sezEbb7+sY5/PrxDb1jUkphwMQV7ifxmPKrPGiY0mkA=; b=RC0MocB1cU/1Hsg0rQ7tKOXXJdmZMAMOIjFjsjbxUJMmhR8F2jD5xfduaog4DhPlZuYfuh KOt/3geJ+Ul8qYBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 13/24] net: ieee802154: at86rf230: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:33 +0100 Message-Id: <9f701c1b64e248539772aee62e130a7e50bbf1b0.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ieee802154/at86rf230.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at= 86rf230.c index f632b0cfd5ae..fd91f8a45bce 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -776,8 +776,8 @@ at86rf230_setup_spi_messages(struct at86rf230_local *lp, state->trx.tx_buf =3D state->buf; state->trx.rx_buf =3D state->buf; spi_message_add_tail(&state->trx, &state->msg); - hrtimer_init(&state->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - state->timer.function =3D at86rf230_async_state_timer; + hrtimer_setup(&state->timer, at86rf230_async_state_timer, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); } =20 static irqreturn_t at86rf230_isr(int irq, void *data) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE61922E3E1 for ; Wed, 5 Feb 2025 10:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752247; cv=none; b=sUXlL9BNiQ1jmwCQcyWyBfgMPuc8bdY1R7TjzQuyku/6sh/ULVlkQde5tZUv+1mujY+V4WbRp3sfJehhm487zLy8OmHSMXQM8np9Hh00oAF6rxlr1SYgCaWTpTYEVr1sBLTQQF2L4hFe1rUvHg8fo+mFnUp5LC2LNrYEzJNZOBI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752247; c=relaxed/simple; bh=OcgxTMkYzu0ag8WJQYBKRWxgz+q/5RYCbC1oVO5V7uU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lvmAsn4l8zB2WiicNDfukInYf23zkO5EIg2086OYdtZjxchD6jzLm5eRUa04Pf6LXRsuc7BITl6hAH8EKlCkO8GgDEIKFawwCiafbkWxu5RF6u2tZesY3HuBMv8YzXSimo5rx6cLudFS93XZgOdEiOl66AE4WBhtugBLpVJ/dCg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=lcnZN1tD; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KUPHA5Yw; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="lcnZN1tD"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KUPHA5Yw" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fILhM7WaudL/ImWto4sWqtAsT0INOvcTAczJC457l1k=; b=lcnZN1tDsHDxngQ9Xrzv6hL5SPepoJSRL8BfTlceu6+G5XyJmuivE5UqCIttuJOVVixEL2 i6OLioat56maLbbWQ3vn3wp+rZ1jNc0cVqlGypygbHDM0/9NqUTm/1fCUe+VWyUIr2fuCs pbidiKhYF0JY9H54Wzs2b4uz1FnjGRWBbfzpiN4eg7Li9lb38az6so9Y47AP41UTv1jVTU AbUby/z/JUFvcSxLUCmrEJTI48EHskWbn2q8Kf0cu+EEPlDhB++fnXEnVfe5KHoy3jW27e YpmsfG+xkMpSJFSjsFyFy5W2aFc5qakb7+P+gGbMQr/ChMdMhri+kQzjuybLWQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fILhM7WaudL/ImWto4sWqtAsT0INOvcTAczJC457l1k=; b=KUPHA5Yw0zqLEkXawpQsLgdYg0D2UMx2GxTELpseuzJNuLjjDpsUm/halfDdUzKBZhDJ4T yZ/IS8AAvnmjVoAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 14/24] net: mvpp2: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:34 +0100 Message-Id: <44e2ebca1a3c1b90213cdb79f7a19ebe0ae70510.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/= ethernet/marvell/mvpp2/mvpp2_main.c index dd76c1b7ed3a..3c7b43712d25 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -6985,9 +6985,8 @@ static int mvpp2_port_probe(struct platform_device *p= dev, for (thread =3D 0; thread < priv->nthreads; thread++) { port_pcpu =3D per_cpu_ptr(port->pcpu, thread); =20 - hrtimer_init(&port_pcpu->tx_done_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_PINNED_SOFT); - port_pcpu->tx_done_timer.function =3D mvpp2_hr_timer_cb; + hrtimer_setup(&port_pcpu->tx_done_timer, mvpp2_hr_timer_cb, CLOCK_MONOT= ONIC, + HRTIMER_MODE_REL_PINNED_SOFT); port_pcpu->timer_scheduled =3D false; port_pcpu->dev =3D dev; } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C10A222E41C for ; Wed, 5 Feb 2025 10:44:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752247; cv=none; b=AmVPm0t/kLBXW88SHLzfIOR6JA1GlvzUWvSgrbM2J02yL+kZURjD5LDaT8E+oGMk3wZrFBERGpPQzDxdtrEbUg5DB6vSmJREhsBSi9WZPvVeod9VuADglseM5SoUQrRfsWcuHFtK+SWhCmflnfMgI4RTjSdBNXQmhs+Ops03a5U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752247; c=relaxed/simple; bh=FzqoDf+9djRGV4O2V7KhBDvcaWsBi4mVJ5qtmklUfck=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=t2GU5S0Efs7nCSpQDxzAY4smSgLNdDMSQLF9p5Go0Cny3bKMWe//TjIvGp9x7P0lO6/1AjPNGRqWJb31ZZVZuWeOVr9jlf2klIe5HAn4CXRZS9m0dLs+Nbg4TAuZPPa/LgxkyUHICjGBZAqKCb19V8fWmYoNMTeyHxl+NcQCzC0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=lc405zqm; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JNPYnZu+; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="lc405zqm"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JNPYnZu+" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xN0W6G+08aPqthOGDvo6LpKjkTabUBuSdTTHJczVyd8=; b=lc405zqmE6EYS+ehBV9ZBAeEWtj0U/pIsH2FNAxMTXUEajo80+PMtaxJ7LKCWTLE4AyYGQ AoSRUpSVKD3w/Ja+4rqDtZWTrjKTxNgrcH4EuRdLkKDypq5WDWaSHeoUS+nWiK66IikH5/ fvVu59p6iejv60trl7yhi+eUJvlSOs/BRXeoaG6qy2+lJYFxZPYXjJlJgFH1VKBfb72RDD E6M6kCe7e915iLabgNlLLwFed/J3CuTbYMlN+m8uVCIbv7LO6D0t095fv50i4r/jbmAGTB AN8T4zVtg78zd6kMrAMD7MGnTUK+x1hBmkwl7x4kKI9fDCde8nn0s2fDfbIRQQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xN0W6G+08aPqthOGDvo6LpKjkTabUBuSdTTHJczVyd8=; b=JNPYnZu+1jVeB8dDYp4GgUS24bsCeNHXh0LBwo1efO8DkObOHIN4YrAebGwCQn/Pebnry+ gHV8KlWjqdO/uoAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 15/24] net: qualcomm: rmnet: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:35 +0100 Message-Id: <4312885d95fc99053b2c285f74cc83a852c03f4a.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c b/drivers= /net/ethernet/qualcomm/rmnet/rmnet_map_data.c index a5e3d1a88305..8b4640c5d61e 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c @@ -686,8 +686,8 @@ void rmnet_map_update_ul_agg_config(struct rmnet_port *= port, u32 size, =20 void rmnet_map_tx_aggregate_init(struct rmnet_port *port) { - hrtimer_init(&port->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - port->hrtimer.function =3D rmnet_map_flush_tx_packet_queue; + hrtimer_setup(&port->hrtimer, rmnet_map_flush_tx_packet_queue, CLOCK_MONO= TONIC, + HRTIMER_MODE_REL); spin_lock_init(&port->agg_lock); rmnet_map_update_ul_agg_config(port, 4096, 1, 800); INIT_WORK(&port->agg_wq, rmnet_map_flush_tx_packet_work); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45A4922E401 for ; Wed, 5 Feb 2025 10:44:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752247; cv=none; b=bSqL5YJiC8D93s+ngS9olM5a4IKnxI4xuFSXPvNPSaeJ286cnGIhtck0VAOhGLG12WCqzKfhv/OOfFqABT5SjxzQyQjKEdr1jDq5x+4YDmz4LbGnGwXneFbizvtuB6J+h/I1gS8nU3zirejxZfK8YmWs+gdkDSKBVNeenUQPC9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752247; c=relaxed/simple; bh=gj/8Mg6slLLqxOr8YxYsRB9Z+0pAaZUEoHEUKUkYwoU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u3H7Qpd73ioIcWH12wTUAUz/TAanVcLl6v5yNBBu/FHr/ss+bnGupoUKesfzvVmlk4+xkiEPG6K9diozFWKZnTN2pT835G5rs9iAuzoJI0HmNDsNsyF2B3lI5i+d6GLVBfXJSCFIeSmFjX2QAW0h94Oh3vNEmlVwqy+xq1OrK9o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=n+Dj/vtP; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=7mnWtfys; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="n+Dj/vtP"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="7mnWtfys" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GI1ayQd/PQf/8dhAdlzeg3802DLw7KK72RtoekfarPw=; b=n+Dj/vtPrtVFl1RmAF37K4PNt1gEs5oBZnpVE7qZOpeS99g+nh4yYoP8aIDN/ulMTp+yvr EQbxQLtLj25AIRYYj+fNleHfGQfIpcxlAmsd5JwqsBh7WquAHrMgBJPnxnB30LaHpJbNyK nQop4tt+D2uM+Izh/thPvqk0BRbElYBpLsNelSjqaajhgqlF4MXMmx4Gfixnit0dUh30qE M2ezFOUgGbYTRmtocrm2oTfQ7Mbm6nosjXQlsDSgCSPj8wF4NSpMZYt3tN8mF7r273aHz7 abL8DVtqpaxi5SWo8h6JWLDHhvkGDQn0Wm0aBpm/5GPCdjB5S1DJCBUqdS+vgA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GI1ayQd/PQf/8dhAdlzeg3802DLw7KK72RtoekfarPw=; b=7mnWtfys3aQ1X7d6sZWk9V0hqttCnZYEfNlRDoe9yEdkKRx8RpIA7YHJ2GszeMhdfgPd+1 o9EoQiVsLh60crDQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 16/24] net: stmmac: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:36 +0100 Message-Id: <73598e0c22ca99ce7a0e863298a0e0902f4d6e1d.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/ne= t/ethernet/stmicro/stmmac/stmmac_main.c index d04543e5697b..8bcb435ec71f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3184,8 +3184,7 @@ static void stmmac_init_coalesce(struct stmmac_priv *= priv) priv->tx_coal_frames[chan] =3D STMMAC_TX_FRAMES; priv->tx_coal_timer[chan] =3D STMMAC_COAL_TX_TIMER; =20 - hrtimer_init(&tx_q->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - tx_q->txtimer.function =3D stmmac_tx_timer; + hrtimer_setup(&tx_q->txtimer, stmmac_tx_timer, CLOCK_MONOTONIC, HRTIMER_= MODE_REL); } =20 for (chan =3D 0; chan < rx_channel_count; chan++) @@ -6952,8 +6951,7 @@ int stmmac_xdp_open(struct net_device *dev) stmmac_set_tx_tail_ptr(priv, priv->ioaddr, tx_q->tx_tail_addr, chan); =20 - hrtimer_init(&tx_q->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - tx_q->txtimer.function =3D stmmac_tx_timer; + hrtimer_setup(&tx_q->txtimer, stmmac_tx_timer, CLOCK_MONOTONIC, HRTIMER_= MODE_REL); } =20 /* Enable the MAC Rx/Tx */ --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28A9722F14F for ; Wed, 5 Feb 2025 10:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752248; cv=none; b=FNFbWY34YyysWK5gVvOf4rB0ezxl+1d0/bvx8p6e/Hogo21r6soB66IBa4E2eZXBWCvThy29d9NTwwHZ7dzTRm3MYDOePXu06O6Xhqc5itqmEo1fGAIvn5/BQJqfsZqStrwQvfW1Q1aj2L84cI1N47hU4Q631/B7M8a/iFfjuew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752248; c=relaxed/simple; bh=uCC/69Tzv+3SfGld3SpWWhGW4Yz0ytwitnZOJjQ88Ns=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DRpIITOwPjk/YDRT66n9iDaTsULG2Jg5DSbZDuqt66YRYCDCwcn+UWBtfJRDno4pRXGIGoHMG8pGlBP7b7sQe7XZaK53+Tk0/GxA1+Gri5Q3puxcBweJES0Ve+NF5DfbuLhzdLQ+zuVSmnZOJT0q1QyTTkwuNLrDI2kFHvBZIS0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=g3GuJ+1y; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=OYEfKmFQ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="g3GuJ+1y"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OYEfKmFQ" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OJZck8LRzJyIgA1Ap3Q6yWpO0JwaFuR18b7pJw7GS/I=; b=g3GuJ+1yYYSlUPbZDNQmpfHE1UZmEJ3g+3HKXIDbPxM96Bxi3syurembalqDn2/zEm18zG XgBC1fbGXy0LKt0IBm5DXCBkkNtR3ckpeX+R13d1K2IlI28D81P+8JpYBne5N3wR8SVhaV c7eHj+00z3OjF5t9PoN8+a/7QHfopdDBF/XDTzAKRQQGd+kJ5Z1ETC6iWwwhTufVqVyUW1 3r6gE1z07m67CeB0WrOMuKJ+M4uVlPTnpDm3wVNmBQYf6tL1/+/4O8gbxizFySmV5PKxZK FbpCbce5Kouv8GH1ZJPkmWfkUyxyaWYWOuDn4WCrwAEt9aI84YHCHlykVCsVGg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OJZck8LRzJyIgA1Ap3Q6yWpO0JwaFuR18b7pJw7GS/I=; b=OYEfKmFQKY2/d1lAFiaqD7PuaofM+ye9VA7ch9tcF4psLIfTnqc3VsAIYmlTQSwv/5b95R A5k2qn6Ec1jPdLAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 17/24] net: fec: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:37 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/freescale/fec_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/etherne= t/freescale/fec_ptp.c index 7f6b57432071..fe4e7f99b6a3 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -739,8 +739,8 @@ void fec_ptp_init(struct platform_device *pdev, int irq= _idx) =20 INIT_DELAYED_WORK(&fep->time_keep, fec_time_keep); =20 - hrtimer_init(&fep->perout_timer, CLOCK_REALTIME, HRTIMER_MODE_REL); - fep->perout_timer.function =3D fec_ptp_pps_perout_handler; + hrtimer_setup(&fep->perout_timer, fec_ptp_pps_perout_handler, CLOCK_REALT= IME, + HRTIMER_MODE_REL); =20 irq =3D platform_get_irq_byname_optional(pdev, "pps"); if (irq < 0) --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3E9822F154 for ; Wed, 5 Feb 2025 10:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752248; cv=none; b=iXpGIG+lCHaOKZ9vfWzQdtBEsHKN2jLDo9aPGD4BkJ0DBEAQXdZMx9M4zkgLK5GFgIJepifbkwXxd/EuBqE81C1SkPqvI4QlCYi5w5stSNTXjo/pOu2K46n7inEWF1zUUBqOB9TOzN2OfoUX7BRziAeq0dqqf9ptPZc2r3l4WlI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752248; c=relaxed/simple; bh=p2zQdc/98oATUbsAE3vHMDv3QX9Fqow3DVjUVEqVFFA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HBJ5F/xzFYc8Mdh4lB2IyIARGxuwIWYu/MG5wdNUNKCrgOGfk87DSKqqd8ttLeu3oQm6pEhFr9NG+XbJkAsd4CS3ypF0bqJ+4+KiTGF0zKkZl+iqXzF9+16zFpmqr/VbwiEiSGNo3IjVn6YR0GkaNAasNmWYhxKiJk3+KC9C5VU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Vrg7V0ab; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bAUBbKwj; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Vrg7V0ab"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bAUBbKwj" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1SPTlKvgRUCafq/9FwoW27geyszg+WVRrGfLeG/pANI=; b=Vrg7V0abkEfw3lEA9C8yhx8XVh/ot8MS8wL3mfx74zZKhD/h7SNFyul+yk/dut0rZE8hmg TyKD9RcVWIgAW1KELLIbnTjblzQiy3sLq7rAvZr+4L6CgWteH86NSu9Feyh8Ygf3etd4Vr 3iYXbq75npYgMV200QQU6IeSFd+UwuNUv77FxIixUGfo+KNsySB4kAGeGRryLeMWAgZAvq DLb3gGWGkujRTDdTwaeXPZf1dmmboOqrQ+fTIQKu/A8WLoyMTEdy0IMzcQ+U+px51gbqph WyZX2gqXGqLU3lm15rT8hhvAr1qEkRz0uRy3GXiFglcBCemaezwGqxJOcm/mQA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1SPTlKvgRUCafq/9FwoW27geyszg+WVRrGfLeG/pANI=; b=bAUBbKwjqNtNzSp1+JUNe9e2FCUMtB4GkbGkx8kt/3AUK8FTbiBUh0EzZFTaVKZiWYzw3A xNaFkg0wgGXuXKBw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 18/24] net: wwan: iosm: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:38 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/wwan/iosm/iosm_ipc_imem.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/net/wwan/iosm/iosm_ipc_imem.c b/drivers/net/wwan/iosm/= iosm_ipc_imem.c index 829515a601b3..530a3ea47a1a 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_imem.c +++ b/drivers/net/wwan/iosm/iosm_ipc_imem.c @@ -1381,24 +1381,20 @@ struct iosm_imem *ipc_imem_init(struct iosm_pcie *p= cie, unsigned int device_id, /* The phase is set to power off. */ ipc_imem->phase =3D IPC_P_OFF; =20 - hrtimer_init(&ipc_imem->startup_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ipc_imem->startup_timer.function =3D ipc_imem_startup_timer_cb; + hrtimer_setup(&ipc_imem->startup_timer, ipc_imem_startup_timer_cb, CLOCK_= MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&ipc_imem->tdupdate_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ipc_imem->tdupdate_timer.function =3D ipc_imem_td_update_timer_cb; + hrtimer_setup(&ipc_imem->tdupdate_timer, ipc_imem_td_update_timer_cb, CLO= CK_MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&ipc_imem->fast_update_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ipc_imem->fast_update_timer.function =3D ipc_imem_fast_update_timer_cb; + hrtimer_setup(&ipc_imem->fast_update_timer, ipc_imem_fast_update_timer_cb= , CLOCK_MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&ipc_imem->td_alloc_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ipc_imem->td_alloc_timer.function =3D ipc_imem_td_alloc_timer_cb; + hrtimer_setup(&ipc_imem->td_alloc_timer, ipc_imem_td_alloc_timer_cb, CLOC= K_MONOTONIC, + HRTIMER_MODE_REL); =20 - hrtimer_init(&ipc_imem->adb_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - ipc_imem->adb_timer.function =3D ipc_imem_adb_timer_cb; + hrtimer_setup(&ipc_imem->adb_timer, ipc_imem_adb_timer_cb, CLOCK_MONOTONI= C, + HRTIMER_MODE_REL); =20 if (ipc_imem_config(ipc_imem)) { dev_err(ipc_imem->dev, "failed to initialize the imem"); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A58922DF8D for ; Wed, 5 Feb 2025 10:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752252; cv=none; b=V53Vbl5T8upCGIQHj6ZbUbFS8jvYVKE0tnV53krIUbvlKyz3GSK7ZgITgdC0MbYxt4NGzJ0aG6oaehEQfRqFceyIH4bgHLKK0pNMhlC5vinA0VOiHaYMFtFsoAjyNiHUEQAav6lCunNB9M1I118Oh9r6gjYWrDuAJiT3RaJ2oyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752252; c=relaxed/simple; bh=kDrdBExXZPZvjIywWbAJO+ZE7wuteJ0moQFbVDamNXs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BNKf8WrsgpzTunN7cadsNGridib6ekRn/Nubu+suga3Aypm1tOifUvylFyBTmCuV1+Nia2SfHCx4GohY7BDddrtuBUOZer+yRTxRpKtpXj7fuqky96AzgsPVs59GLdXQmj5QoI2TnB72Z8udgq6qPWW/d4fgPInMDgVH1Sjh+k0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=D2mYY67X; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WSE9NVZV; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="D2mYY67X"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WSE9NVZV" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LXhPZGp8ksTIzNtFwKUTjjLZk2nMVDrwGqLMHbiHCRA=; b=D2mYY67Xq6egJAavxqJG8/xdDhPvAcldKHnWp2BT6H3WaYV97yFxhUj2Eh2/H20yfsNn64 w7E9b7OsWEZhIY+eDRv16St8a/qyJML6B0TLDJ+VhzLdhPc9Cl4kkNBMxjpdqDMldyg0al 376k5lVNRZzY+EzJRA/jO1fpR82YLcxnBn78HvwhNdOD64e4AjL9EBXHLSXi57KJYwSHl8 TuIXxTbZBSlKskmy6UDVK2c8kB2WRO095C1Gdy60T3cauB4XmFELyin07Yoae1Rw4BTR3I ZBj4qGviiyvi0aR0o5GGKDaCwA48Tw99oe18W10tnWyu+Yv+GiChdNQcefsuwg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LXhPZGp8ksTIzNtFwKUTjjLZk2nMVDrwGqLMHbiHCRA=; b=WSE9NVZVOA+aXWv+zhgFG3sK7Ez5q87oFKcwb9UEcmeirNn0+ZeYWyG7wyAfCPIjgx7Wrv PSA/0ZbacDYueCDQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Oliver Neukum , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 19/24] net/cdc_ncm: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:39 +0100 Message-Id: <219735f98754fb30dcfd892fbaa5766f9d78c1f1.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Oliver Neukum Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/usb/cdc_ncm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index d5c47a2a62dc..34e82f1e37d9 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -833,8 +833,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_= interface *intf, u8 data_ =20 ctx->dev =3D dev; =20 - hrtimer_init(&ctx->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - ctx->tx_timer.function =3D &cdc_ncm_tx_timer_cb; + hrtimer_setup(&ctx->tx_timer, &cdc_ncm_tx_timer_cb, CLOCK_MONOTONIC, HRTI= MER_MODE_REL); tasklet_setup(&ctx->bh, cdc_ncm_txpath_bh); atomic_set(&ctx->stop, 0); spin_lock_init(&ctx->mtx); --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A68F422F166 for ; Wed, 5 Feb 2025 10:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752249; cv=none; b=eS31mhuy5e1D/rFJVS+7EgnCLLC8G9SD8UC4nc74JYhx6XqJYi4Fw2piwGARTM4vJNmufdGUYUELrA1O6Df5f84QE1x8DJhJ4SA2nt8QGYem2Qcfh7pN4a7YihV38hWv/LVgLQTBWYJUjnAMGrz7Tm+6/p8mif/MK7DNN69iTt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752249; c=relaxed/simple; bh=PR2Mqk1KrrHehsosHOryC1HwsemOk4FPwadNczvPXkY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gVy8wYy5WpiwSYXvXTOel/LfSZFeNGblJ0icRbPFqu63J4lhcr1okoa7lVWyab8lla5lpYzgzQiASwUQirjeo7ZFIc1IcIU1pESF7ABOGNy02hWPs7wmkBQ60I1pipEo9Xl4l5V0ucWtvT5Oldu4ZwcpHlejwC+etHQLRvAQvKA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CgyrMiJ1; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sT1mIR8t; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CgyrMiJ1"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sT1mIR8t" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qnrP38rnbLoU6rYXGj+RFE0S1Z4qH6B4BN3FfNJTeTA=; b=CgyrMiJ13+nLtuMWnt74N9S0y0ycJytXwtlryVY1Swq4aio5MVDtZ4Q411ARtAvZkfqXgf TAnFMu+y/GfuoCa85YmJ0TgZ41BQ7J09DPZcss3hMVN0+mspJgwsVTs11mKIqWnVvvfpnl 0qm32IW4U7QcOpt6vnNPJLb709qHwGlL+btdo79ybltLuJso+K8LQSld4SFoZ20/oIh1AM xdSP//V5LUncPp0cujGA/3a81N6BdLAhZK/7JMcL4HztxfQ2Acx584Xo5bZJBYIDzJCmki SFjnq6mm1HpCd9RLyQOZ6CdoDc9681QbXuotnqrwKbLIzJNDMK+31pDEH+ywIw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qnrP38rnbLoU6rYXGj+RFE0S1Z4qH6B4BN3FfNJTeTA=; b=sT1mIR8tuJzH6WhCHbZkOD/MSsqd3rmpjYXDD5+zx7Ylk1IkmhWcLEjYbGTuqvIGDr4vaZ ghYlueNAA1WZLfDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Kalle Valo Subject: [PATCH v2 20/24] wifi: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:40 +0100 Message-Id: <71fbc442aee9a9e892e475f3bbf8f368c6692a55.1738746872.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Kalle Valo --- drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 4 ++-- drivers/net/wireless/virtual/mac80211_hwsim.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/driver= s/net/wireless/mediatek/mt76/mt76x02_usb_core.c index 0e1ede9314d8..4840d0b500b3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c @@ -264,8 +264,8 @@ void mt76x02u_init_beacon_config(struct mt76x02_dev *de= v) }; dev->beacon_ops =3D &beacon_ops; =20 - hrtimer_init(&dev->pre_tbtt_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - dev->pre_tbtt_timer.function =3D mt76x02u_pre_tbtt_interrupt; + hrtimer_setup(&dev->pre_tbtt_timer, mt76x02u_pre_tbtt_interrupt, CLOCK_MO= NOTONIC, + HRTIMER_MODE_REL); INIT_WORK(&dev->pre_tbtt_work, mt76x02u_pre_tbtt_work); =20 mt76x02_init_beacon_config(dev); diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wi= reless/virtual/mac80211_hwsim.c index cf6a331d4042..fb187a9e984e 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -5548,10 +5548,8 @@ static int mac80211_hwsim_new_radio(struct genl_info= *info, wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); =20 for (i =3D 0; i < ARRAY_SIZE(data->link_data); i++) { - hrtimer_init(&data->link_data[i].beacon_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_ABS_SOFT); - data->link_data[i].beacon_timer.function =3D - mac80211_hwsim_beacon; + hrtimer_setup(&data->link_data[i].beacon_timer, mac80211_hwsim_beacon, + CLOCK_MONOTONIC, HRTIMER_MODE_ABS_SOFT); data->link_data[i].link_id =3D i; } =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E8CB22F386 for ; Wed, 5 Feb 2025 10:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752249; cv=none; b=eVM+yNFlmToTjyMNIaLe1eiQTW30snfZcXkxA3ZKVK6oMph9nI2T8NY607lu2zaZnuC6G+m5X2flEz4KXRM2mdUUPofEIwgczXOEhwm7O1dbo8Z9z8LJ/U3u+gHQ+ORSRKdDbwJi6eZvPhVGDZXoAL/kb2d4WqiJvEaxztt9dd0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752249; c=relaxed/simple; bh=lwdzT4D9tUSr70iEBlqm1ErOjEZlhxKoCny6yVDtLQ4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nPApva5XAT042/5vfQUs6zKFxrTg1DIVT1FHWqnvpR51DJtOE+Ih3pvjmbJeq4a/s+WB+Ne0N4i0DOrhlQ5WCE3+lbHVZvMnirb7ckavZsI0fO1Nz5LrJ9/76KPGhEyjcB50bpr9Owy5Z4WLpplS105rRfCZwKPHM6+N42lAfgg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CIxUZkLy; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=x+ABu66f; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CIxUZkLy"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="x+ABu66f" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tvuUjZiP7cBPl9y5gYW6v2NngZPMaIEP2c/Ga6hOKA0=; b=CIxUZkLyrlh4EkXbxlaJEicizzKWg00pcJL+mtXyVQ74StHHwpHmREJEdBbutwt8hUd/W4 wqNfJTRjPMCo+5judIj47qcdd1ZJROPq8DE+w1cGZXDbD7Y+1p4zCSi4UKCwPBHeH+9uou GMOZ1SLQrk8JSd66Q0qtlOcfvQnCnBwI2ZzYIVyj2nWz6REhx7jhZ5HmUB+xkrb+O5nfxM EHldujlrCnUrHMUsTkTdnRPa+iHlfi6iB7pvPMNjlKEvf20VLM161Xj7gSKPZyAfJ9yyzu EHV4ynSKFS2SQCm+Ca0ATfDdQR9Z2hzWlbDabX4cnSPPEoVXK876MyD9av81JA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tvuUjZiP7cBPl9y5gYW6v2NngZPMaIEP2c/Ga6hOKA0=; b=x+ABu66ffyKqT4e3kdsr4L1zwnPPghwlc3KMXvDsiui0tlkzBOpYSmMspK9RwlrCXC90AV MKr3eV9+sijx3QBw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Kalle Valo Subject: [PATCH v2 21/24] wifi: rt2x00: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:41 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. This new function replaces hrtimer_init(). However, converting this driver is not obvious: the driver calls hrtimer_init() in rt2x00dev.c, then set the hrtimer's callback function in rt2800mmio.c and rt2800usb.c. Therefore, switching to the new function is not a simple one-for-one replacement. With the lack of hardware to verify any non-trivial changes, keep it simple and calls hrtimer_setup() with hrtimer_dummy_timeout() as callback function pointer. Signed-off-by: Nam Cao Cc: Kalle Valo --- drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/w= ireless/ralink/rt2x00/rt2x00dev.c index 9e7d9dbe954c..432ddfac2c33 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1391,8 +1391,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) mutex_init(&rt2x00dev->conf_mutex); INIT_LIST_HEAD(&rt2x00dev->bar_list); spin_lock_init(&rt2x00dev->bar_list_lock); - hrtimer_init(&rt2x00dev->txstatus_timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); + hrtimer_setup(&rt2x00dev->txstatus_timer, hrtimer_dummy_timeout, CLOCK_MO= NOTONIC, + HRTIMER_MODE_REL); =20 set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags); =20 --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9C4622F39E for ; Wed, 5 Feb 2025 10:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752249; cv=none; b=N8jE3mNXULj0+Izbnyv/kRXCbb+jRDBSu2SJZocqxjF4l9oa7QR+iyD/A4kytGG5lM3HWluhz/4LcbMw3gvaGM9o3KYMKAyawyuEGbNQUElnTsxzQHqNtK6TrQDk0fz4QMjTHNRiPJPUZ5W6g0MlV7fT5J+uyqxXHI+PjuffaX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752249; c=relaxed/simple; bh=Q4vk5D1wDmsBdUltdmNYprQX1rc+kKtOrEa6qf6kl2g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Tf9koYxjyxqr/MJyTe/z3pObEkP3mZvs6/PbZ9fZHyNABvVcUW4wVvQeCnZ/8W1PFfzAOuIf92wq6hHaeiA1b+dGjjeM2oI7ojLsgeDisVsCMiLxONLaolLyZnshquGCZWAS2UfBDB8AlO/KfMgPccfO5ClphGZsEMBmtYdQBvY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LEAYRWop; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=5QZrjDOY; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LEAYRWop"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="5QZrjDOY" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dfC5OCWs8G351UT8EZKOWgRxOfS/WPv9BXMb+HW3OEM=; b=LEAYRWopDViGeBhtmP9Li+zktwD92F03UrlJ/xFDnqfG7XVvs/YlYpARxLpTIux4Rv7WkQ oeDkFxVpMD8iu14F8zsLUBDsko2tv5ztCpY+EhmNY36XVZMxsl5aFIQFbBOdZt4UlHZW9G V3w+Tgu1hfAaETaiTcA5+J+z9vzBEZtzWG1R/6WGOHPslh9Dy8hHG6BYp/WOu+Uk9EBMJl gW/UiCPdHR47o1X6P47wXMdfpSoyhgEmci3sKuBMUgRgN+6FaOWaAo1XzEav2qSnDPKsar Dqy7jI4hAf+xF6cQWO7oJnoeuIoCSkDdyPRXn17EutHfjemE5jlsTlyNW0fLtg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dfC5OCWs8G351UT8EZKOWgRxOfS/WPv9BXMb+HW3OEM=; b=5QZrjDOY3Ze3nfkh6sLLKfwS/TkF0UdlZD7HlmLKS98DIN7SpT0fDf136y/n2FLPyAq4he feUJmCdhjiTfqxBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 22/24] igc: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:42 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/intel/igc/igc_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethern= et/intel/igc/igc_main.c index 56a35d58e7a6..fb8c89479142 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -7086,8 +7086,8 @@ static int igc_probe(struct pci_dev *pdev, INIT_WORK(&adapter->reset_task, igc_reset_task); INIT_WORK(&adapter->watchdog_task, igc_watchdog_task); =20 - hrtimer_init(&adapter->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - adapter->hrtimer.function =3D &igc_qbv_scheduling_timer; + hrtimer_setup(&adapter->hrtimer, &igc_qbv_scheduling_timer, CLOCK_MONOTON= IC, + HRTIMER_MODE_REL); =20 /* Initialize link properties that are user-changeable */ adapter->fc_autoneg =3D true; --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 834C422F38F for ; Wed, 5 Feb 2025 10:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752249; cv=none; b=f/W0G41po5BV3Zr/1FJsUJPoIIgeXp8IQN2PfWwZYP0i4p01WhYoAqB9P1MQeTlhcDAfvr40ngE4AvTtdJZrc06H1tRfP+uEcL0TRwVFUMHQhz4WPwuHa1rXGk4r60LBhjCL8Iwv2GbEx4sE1mgksbQ6BO06FGgt8cn7ZDNtUE4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752249; c=relaxed/simple; bh=iR1UsIzOrIjG5jzbUQtXZAPUZ09YMDf89UESfQCHUqk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ramebVM+AVIWswpbAD2WO3slc0EXxbBGMJIe288lzazLIl5VckuqcM5D6573UE7IvTE4p92sfva+wpp4LP2m8Nkh4H19d3KLeKz5ZYc1HQxlczhqPmYv6QTegoxoE8PbDZWCJ4L6+S2pP4A3DeQlFmQamYnw0pgSjLmSK8Ykph4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pfR4hQ6k; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZYYBUc50; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pfR4hQ6k"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZYYBUc50" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QF3/9S3+JV09Ieqr2eh2ZCr5yrVfRpW/vC8PTa3ZLqg=; b=pfR4hQ6kQkJAtanEFCgVZLDF8EPo0wgfcC4e7Fg8smVujpRij4yv6LyHd6gm3S6mVO+3RQ xs+nrnWcXuHyaiQi6n2ZXO8ip5HJzZEAgR264IKMFn0otJyZk2dm1etdc91bHA7MFDzW1Z Zl2PqKrwCdjKoMbaEK7hlhsYuJd56dRaSi3g/ymiTofjSVdDVvOXadw5dWm+cG+9EhtMMy CGdvTSx0sdL7nutJDA8XyLYYh2hPgZ9JB8cGdfg92ob9YjrkheIdYlQx0Ssv3S7/WGXWQH 8sHOCbsasBhfo/Rfelf3AWAPMtByBzWhzm9aAXI85x/jWefxnvJZSXIB7z7W7w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QF3/9S3+JV09Ieqr2eh2ZCr5yrVfRpW/vC8PTa3ZLqg=; b=ZYYBUc50xWJ2GcKsmKml8pR2/65EW+w7gFUuHEgomS1nbgbtsK3h6km8Kl46OUccilfAyc DISk+JuXARPSxECw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 23/24] octeontx2-pf: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:43 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- drivers/net/ethernet/marvell/octeontx2/af/ptp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c b/drivers/net/= ethernet/marvell/octeontx2/af/ptp.c index bcc96eed2481..66749b3649c1 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c @@ -545,8 +545,7 @@ static int ptp_probe(struct pci_dev *pdev, spin_lock_init(&ptp->ptp_lock); if (cn10k_ptp_errata(ptp)) { ptp->read_ptp_tstmp =3D &read_ptp_tstmp_sec_nsec; - hrtimer_init(&ptp->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - ptp->hrtimer.function =3D ptp_reset_thresh; + hrtimer_setup(&ptp->hrtimer, ptp_reset_thresh, CLOCK_MONOTONIC, HRTIMER_= MODE_REL); } else { ptp->read_ptp_tstmp =3D &read_ptp_tstmp_nsec; } --=20 2.39.5 From nobody Sun Dec 14 21:31:08 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 037F022F3B4 for ; Wed, 5 Feb 2025 10:44:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752250; cv=none; b=m2oAWlpL1fv4jT09BDFa4aGNjGsP3WwpgdTfThzoST1JXlcdDGX3BM6unVkrNbo4sSjA3ERRod2TENHnP8nkd2fltHv+WrtnwU7TGxlIJt2/oEaL0QAtCByuuO2CJduA3B6PcZSpTNFADVCphx+QuL/MxLYHQh0k/lgLjf5PPlY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738752250; c=relaxed/simple; bh=KGS8vhGRR2eHOXmkjqrkc+GP/9h46GaMmPLtKj3+wnE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OdkxahfULRKnOyA+k621t0NnIEXyozcm3s8SPxgBHjEUuvIDD3f7VWOzDCQYtIY7/oMmJza1VLdvjrgYYqxVXNjtaW0pXz288UwyUghejt4KuXQQXrLOFNKBSfNfXYP3dC92Bl+0wPtDlxkfRGmw2PeNyFG7756ObY3Tp0NCmpc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=P0hOPQXr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WAuN/w8m; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="P0hOPQXr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WAuN/w8m" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1738752246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eS8b4wjj7FsT/6AEfL6jTm7G7uaMle7YtZmUlKJVEE4=; b=P0hOPQXrI7A8ZcxEvChGypmMBkCWyZb2dsMsfHUSRDL/WF9d+fJkcd4XHoRZGWxSKRRHkM y2AdnjL8YYSNo9jLYnhgsFiYVXp/h+QnCibVtrqm7s6DwRWm0YnhrxP8iFJ2BLYE3tX8ov O0fbc0fNvxx14J+qCPso2/J2pCoOhgPUCGN8HVpqdwXH2NGWWADaLgUPznvwdmU3zYUEN2 omE1dBIFMK85c8D26W0jPxvh7v8d68SqO8Uuds+WBfxRZ/08Jl1S9FEYMQOxHA60TjUhd8 FfBLw38iK3yDQFSW7qD/d5cFbVIULwaEefZLP6+VDvlfWoChIuIGUAXhs9BZOA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1738752246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eS8b4wjj7FsT/6AEfL6jTm7G7uaMle7YtZmUlKJVEE4=; b=WAuN/w8mMasjAZHWMwgTBVilxcFiHVvYRRwLUs7M4HeQ9l7Rw93LqUn6QY9onzgM8+4Wai 82jngHdyqgDddkAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH v2 24/24] xfrm: Switch to use hrtimer_setup() Date: Wed, 5 Feb 2025 11:43:44 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Signed-off-by: Nam Cao Cc: Jakub Kicinski Cc: Paolo Abeni --- net/xfrm/xfrm_iptfs.c | 6 ++---- net/xfrm/xfrm_state.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/net/xfrm/xfrm_iptfs.c b/net/xfrm/xfrm_iptfs.c index 755f1eea8bfa..3b6d7284fc70 100644 --- a/net/xfrm/xfrm_iptfs.c +++ b/net/xfrm/xfrm_iptfs.c @@ -2625,12 +2625,10 @@ static void __iptfs_init_state(struct xfrm_state *x, struct xfrm_iptfs_data *xtfs) { __skb_queue_head_init(&xtfs->queue); - hrtimer_init(&xtfs->iptfs_timer, CLOCK_MONOTONIC, IPTFS_HRTIMER_MODE); - xtfs->iptfs_timer.function =3D iptfs_delay_timer; + hrtimer_setup(&xtfs->iptfs_timer, iptfs_delay_timer, CLOCK_MONOTONIC, IPT= FS_HRTIMER_MODE); =20 spin_lock_init(&xtfs->drop_lock); - hrtimer_init(&xtfs->drop_timer, CLOCK_MONOTONIC, IPTFS_HRTIMER_MODE); - xtfs->drop_timer.function =3D iptfs_drop_timer; + hrtimer_setup(&xtfs->drop_timer, iptfs_drop_timer, CLOCK_MONOTONIC, IPTFS= _HRTIMER_MODE); =20 /* Modify type (esp) adjustment values */ =20 diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index ad2202fa82f3..9bd14fdb67a5 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -746,8 +746,8 @@ struct xfrm_state *xfrm_state_alloc(struct net *net) INIT_HLIST_NODE(&x->bysrc); INIT_HLIST_NODE(&x->byspi); INIT_HLIST_NODE(&x->byseq); - hrtimer_init(&x->mtimer, CLOCK_BOOTTIME, HRTIMER_MODE_ABS_SOFT); - x->mtimer.function =3D xfrm_timer_handler; + hrtimer_setup(&x->mtimer, xfrm_timer_handler, CLOCK_BOOTTIME, + HRTIMER_MODE_ABS_SOFT); timer_setup(&x->rtimer, xfrm_replay_timer_handler, 0); x->curlft.add_time =3D ktime_get_real_seconds(); x->lft.soft_byte_limit =3D XFRM_INF; --=20 2.39.5