From nobody Mon Nov 25 10:39:51 2024 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 575EA1CF5CA for ; Mon, 28 Oct 2024 07:34:46 +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=1730100888; cv=none; b=W3HUYaCFl+RwcVWSwwRCKSmOlzzecoEu1nOXLtBJ6N6OILROr1ySAWM+gIkONwdJVM+sS+ohk9Lk8mUZ0ACb7mYsWyk7ZJUfpNSJtLTRJEeFUwlp/xrX/5Gl5J64by4/sKT56hbDEXr8uhayiIU6NX5+KmFUSTp/7g9OgGp5z1c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100888; c=relaxed/simple; bh=miT8OtQMm1y32Xc0/YDlas6CWZQ8j1jbIlPl4FjPCaA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sAQKlh0GJqn1Q1ihHAdoux2dMyCBTHjrTeLDGtCNSofdhGdzVYWfpBNqAR6qO+Ej3VSuKKfh+htpLyUA8TGS6gmvxKtvpCUYWtBJHRdV7Ipo7P0s52K8PhcPKkcvQz6tSud9kciHZLi6X/46kiOtYKYF1xXJTCE785SuP3crUHE= 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=rIJUCe9f; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=e0MFjrC3; 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="rIJUCe9f"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="e0MFjrC3" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100884; 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=qcXDwPaoD5nocGgqRGtaTVq6ULiMLIy5K2rLo240QfA=; b=rIJUCe9fwHjbRJGBfCICejqCwCRj6AWZCQRhbQpDu1yKOjeYNu/Yy7HJeCtej0wUSyCZ3f 2vtS1KGxzrwRtlNPpkqdC6bYSaIusiGEE5YzxW5lD+hi4bAIfwlnwEWRAmB3eNNWvgI2cP GySDwW4SbYcX40EB8tebGL02WoXtfh5tjE9ORdk0Au+ZxZPA9gSJ5dqZOC2Iou8H5zeIEN oZoi88Ajr9wQIJSklow0qIL0JOFNe8BfcQaUMv3LJ97SFQ7m5SUWSV78y5nwgOucUxu6g4 6lbV3fnCfTSPpYjxqv0OGL+dJGkN61xz7X+9NzPNv1P7RNfnhpXUP1jP5FEr9A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100884; 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=qcXDwPaoD5nocGgqRGtaTVq6ULiMLIy5K2rLo240QfA=; b=e0MFjrC3pM9PqCCx3zMNJ51OVIjNKVkeNiJ8ku4g6WuLE6yVgZyFm5jRyZEYyIxKT7NGnW xg8RUMQ+XD+XZkBw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 01/24] netdev: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:14 +0100 Message-Id: <287f1d85c215b99b21556fe4de5d8d7df0acb13d.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 cd479f5f22f6..83971c85466e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6645,8 +6645,7 @@ void netif_napi_add_weight(struct net_device *dev, st= ruct napi_struct *napi, =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 Mon Nov 25 10:39:51 2024 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 6EB561D0BBB for ; Mon, 28 Oct 2024 07:34:46 +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=1730100888; cv=none; b=hVCakFUO9dL3wrF1vJxAFvh0FpkLh+pvGCTbzDX7jAl/mNITtMK3zNMKVs/ghrjM2gNCLQThyMDAWhOwrT0ScDXHqm3OlSM33voBVnZZXcEYNiX3YnKzXrte8B0H2zb1IclZOODVs+yM8BIk4IQzVbwjEv1XyobT4rgg7bk0fcA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100888; c=relaxed/simple; bh=P8riEIWm7ykAvuWcsOp75Ih1vHHOFlRsTiRII98oDtA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sjtEKHewdhCr6Rv5gPI+XekGTPU6Iw9KA5NsbLfcp6xJR4CI4jhRzPylDnlwemxaL57tggGp343WVhjgRjeqRPNGxATG0GMU2e014ntiRtPTZVzMIBsQ2XZtl1VsfwdHbDF7OoCI5UJ+4zFApwQ6rJpwvmvL9BBfgWddzO4vYHs= 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=uwlaA9IC; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=gjQGE+5i; 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="uwlaA9IC"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gjQGE+5i" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100885; 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=ikpGWi0uGltmqWu7YqbXrObJlOk7RQGNuhV2+Ee9X/E=; b=uwlaA9IC2iTV+NbB1G5j7fdpIyCyylPvAG1FkarZKhC0bkU5jrzMEwNAyUhWteOdt2g/gr vZHh4FkQfVN0RqZZkZJB489a99I1DL+s+l+A5Z7SXdTw/vuMa8+nRRzJq0Fma4tzEUQvLV OdKtodlo/vHSCVoW2Tkl9VOSakRRtBBOpG8xr4fBwqJiYuTIwt0m8XSG38TBjtPln5fBZI 8IaKU5LDxdBTGp6v054wNdKtrBmURw7GeEL6aYYA3Sjq6YvHbzhgbpR2Ldwn4LG+VrBGFX 6ttbXIDrvlQBeuv25GjTmHmaJlyM7jtyUxwbqU5lcH5v8T37ZI9WOMlrigFLBg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100885; 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=ikpGWi0uGltmqWu7YqbXrObJlOk7RQGNuhV2+Ee9X/E=; b=gjQGE+5indy1HwRNZ5Z2prR+8Gm/gZ8nkARFJthYqMTw42111Gy/U+3glx+pLXWqnf4RQ0 jXQi7Gpf+58jcLDw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 02/24] net/sched: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:15 +0100 Message-Id: <2c4743b934be6bf071a696446c296d6546f070e9.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 1dd74125398a..ba4bdb71f1f3 100644 --- a/net/sched/act_gate.c +++ b/net/sched/act_gate.c @@ -292,8 +292,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 74afc210527d..679d441e6074 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -620,8 +620,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 8498d0606b24..9b8bc27e633d 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); @@ -2055,8 +2054,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 Mon Nov 25 10:39:51 2024 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 08E6F190676 for ; Mon, 28 Oct 2024 07:34:46 +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=1730100889; cv=none; b=ImEPpzjYis7HlTc3lfMLw/irXAuTSwSdx5BMYwuD7GTq5M7k/UpXzS+MUCfKUYgwCJG8G+HHV1ex8cHqs8VH+08ZODYR/nn83c9wNTFwwjQ9AJKwv2zxTDmJ+zX4cNCsl9iFLiYdWyutD/giJmeDv1hKyxequzQq3PfEttP/a6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100889; c=relaxed/simple; bh=uSFmRHZ4mORz9jnaWbqf93G4GdYS641MvBhPZkvsHrk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kygWUIJs1UAFZixAvt2XctnpmV58+J6DxFLP9cSNGwn7+nbmhRy2V7whVSoce15eHZ7RGXml4T8xwrw7AwR74nAGbLrsCn40eqnTLHJozB/pIb4LLANn+lwQk5ctvzPPbEphEwEwq8awGZaGMsUSzTeHksBOMOGrLA6qBxBkRWg= 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=o+Y8tmAV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=60rYZr8R; 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="o+Y8tmAV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="60rYZr8R" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100885; 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=nZKpBfygwf4iBxAlcXdYvSaGK+lTqEy3dGw1GX1UVVo=; b=o+Y8tmAVtESwzzllBu7CqaZsiX+qprLqcUvOFRiChvjI3xgPgxxnfsiRN1SeDnYwN9eXP0 vxfg/7nZun7rSjYfPphUOVGutxSbNsUTHIQEeelpEq5M1amZY1eaIvtesyN8DnguyJ2lYf rBS3oFcP4nL3Rha0eI3fD8+YlHvu/XbrmQeGPkXsZfI89s6sOPRFRcA/OwqalpfdsL5Kv0 lUsI1uZN51urROz1S1C6lZtpAfUzCVrHX5sFWfbpInYXAlY2wZzcbs5yqVdIaXaJF9UVpy tluvfncWEnWBbbjyDv3XJ45bCegbVn3ytKH8sbEuWzNtfi+OSelaTabEN6SuYw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100885; 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=nZKpBfygwf4iBxAlcXdYvSaGK+lTqEy3dGw1GX1UVVo=; b=60rYZr8RL+vC7qpU4FddZ7i8kdAf46QRUpY/B3gf7Kq3CHx9J1ma48I7Bc9HY1u5ENg8+h 69fS1aBi7q3Y45Dg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 03/24] mac802154: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:16 +0100 Message-Id: <6bdfd7e7a3cac9856766ba7f1eb25a7a6378950d.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 Mon Nov 25 10:39:51 2024 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 4ADFD1D0F44 for ; Mon, 28 Oct 2024 07:34:47 +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=1730100889; cv=none; b=ZYez7B4QIpNNs3JktNkPY6eB05LPbfHKuQ1nRdF5lcjYlWwGqrgFhQxWkMEuS/dTPDHfiuK9kFlePnPrsPGTo8tVO8Z279M6iZBUjqmj5mW7hgcRSFFvmhQZyLDrmKYrge3ZiCqJn5y663TORNf8hfyXsGgx7yGW9K8xrHJbGaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100889; c=relaxed/simple; bh=B1WDcXop0ExBXIdLaaXhRD8YeAYsjUTt23cq/CcRYTo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o2eLIb1SnjNLwmBjApnYNOVZQ6zf1gZroch+plUQmCBn4sM/o+ArPUcR6J6fUsLhN4rJGZbmpRhvoysTq2CDQU0xkct2RzHOaOiNeSio2sTzRx9MNDYxscLbmHG5qltphv5EXMZuv8y49D/bu3419SP9CeqmbiH5TC8RLOmyswY= 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=BGOVTHgF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MkDeYlBY; 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="BGOVTHgF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MkDeYlBY" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100885; 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=Apn3cvIPvUI0d3S8Oue+I7c0RI2f9N2EuYLkYYaFkKo=; b=BGOVTHgFVp/D6RxnxO08lkeZUYLKo+11JdpxDUbmtOaCcbbOGW57UJYFUtHdGT7eU2qgbY ifgmHiLvfWGLs7zEcVTRJhBLFAlQ9uPyzyXbaBpSa5jKYRxU+8yU/tjeU915hEjYI1dwKx tQiBwvJZJaVqAJEBUMqHFeqpCCzt9d5c+lg+ZsSIsC25QKOpKzVfW8auDSw+Oar5nFiSEU BM3tTssYX9OjJmdD4pzmoinSc3lpAV94DuPiSNLN1p4v3/6/AOJjboF7PTUlFbjvNVcKjS mwKH0t2Sg3yxjwhihJFS7vZsJrp+261LlpS3klHP3GTh6nviaLmM3diC0YxjRA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100885; 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=Apn3cvIPvUI0d3S8Oue+I7c0RI2f9N2EuYLkYYaFkKo=; b=MkDeYlBYjz8g6UXZUBudsJGE/FW4g3eWjaQflx6qUCoaiSaV4Pz1FUvnMk44kPOxUCe1v5 INjd+CB8qvFO67Dw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 04/24] tcp: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:17 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 79064580c8c0..6fa99cac98c2 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -869,11 +869,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 Mon Nov 25 10:39:51 2024 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 A487A1D31B2 for ; Mon, 28 Oct 2024 07:34:49 +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=1730100891; cv=none; b=sZ17eVNIszoDzp8ZrKpq3DjvqMplsnv0LY/v6WaSVMCWxmWAlnASaeCL0XSMD+nMq46hx6KngRcuikJ/SPoZ0nsUlSc/JC2GDE851VEX9qy2nB8gQmEoWYc9gsALDHk49Zi8peZBXWICxe9vJC0wVrmQWcrupa2Imha4H5Cza0s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100891; c=relaxed/simple; bh=Y+77rAFyJjr6O7/apVOnG8fQwHbcJe9D5sPzG/4Owag=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iZCD9gliUSHcj4BITgOnLCs+D7mkaHZDx/2/m6GdH3XSSAsMeheX2L5vU2+J/MCeWRXm51QQrT6c3+J56RR5uvyiSXFIYVfqV3fXx/SlU2ujFP0lXodSlvo+woWRjgEMRXLAwqgfc83oZF6i6/JlU46VgXWrK2PFOopk2msQrwM= 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=xu+E1iXE; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=53xYap65; 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="xu+E1iXE"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="53xYap65" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100886; 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=+7uNKWBbzPWz95iDcacBD8fF+R+5w+Zgbamu/TqXvK8=; b=xu+E1iXEltSH0t9a/aUDFztFpYx0kvWVe1V2ANGuT8DOk2lEyjKkRtVNE+1lZm+DCe1fP/ 7le5QBFAoxxusTVpcv/A5EgSKe15t31lSU1LZyvktgN8CkTsL9HszF8rDd4lfqA4X2ZnrZ bi09bRZX84W26NVVSLvz2IsTdsnqVonLZRcSiIHugUHlnijloukxpLCXr4FpyQVrhsOI+T rQuzRooU/No4KDZ+75WYieVuMcwqMol9+EwHYgWE5ic/obKoAHgNIGX+gSQcwXaAJ5EOKH W3JpeTHHZR86CBAo6m9ENDfjhcvlmX0D1N5XJAcM6UhbrMiEHHNjQqMOrDhyrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100886; 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=+7uNKWBbzPWz95iDcacBD8fF+R+5w+Zgbamu/TqXvK8=; b=53xYap658irjfX1tehZC26KfxX03emaDgTjD62jZOAudG0DZtMdp3k0R53iwt3mWaeJCp7 fBFqWDYfuRdpCODw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Marc Kleine-Budde , Jakub Kicinski , Paolo Abeni Subject: [PATCH 05/24] can: m_can: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:18 +0100 Message-Id: <16cb05a8163085445bd17b68ad54bb11d2b2c450.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Reviewed-by: Marc Kleine-Budde --- Cc: Marc Kleine-Budde 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 a978b960f1f1..183f6eceb7e9 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2383,12 +2383,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 Mon Nov 25 10:39:51 2024 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 A48251D3187 for ; Mon, 28 Oct 2024 07:34:49 +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=1730100891; cv=none; b=dym8WpUAQstQIlBm1UG6MJ7w16MkoNgBhh5TTJEIBdnnHxBGuH+Sg47GFLTEjcpgyjFlA1mQyXzkKBoTbKL+PGeACCzB+R9mPutFGgCrkN6D7CQjD5eyX5zGYJHWg/y/O7Hhm34xty+eBjRn0RZjMUu9/m48D3HXYolmhpUQgj0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100891; c=relaxed/simple; bh=KbPFQP63/ovAgqBdm7wnwSuk1n+U+vQAA9GyfG0Q04o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Zhqzvq09GPwaSexHqlX/Uwxv71+Lnf7ibmFCeQl55FT+AhrXCcmdzkX/oH7S1C3ETc4/cSif8EAji0xuLawOKy64qSh0CkV1yDLdJ/WQz63zv1YiiOtZv5WCvmxY9ITI+i1aOyTbwXTPO27wJIoEIfRoIIsNUwonBgceRDpS3K8= 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=cN/EetKn; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=A5lin1M5; 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="cN/EetKn"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="A5lin1M5" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100886; 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=v7qiAY8VJqUm2qD8urA303ZZHGYQFyPGELI3HR/BMzg=; b=cN/EetKnFGkXPnqcP21zVx17pXJ1ewThskU9/HS/TrZgZgmLwLTrCwSTnwxUSXTn8nrr4V zaMmA4z/NthmO54udTfKlAa+HpSHDukFmfxfvdnQwJHnSePPPJsklCw8wO+iCsKV+M459p 03vOijTObA+h15PFW3CBprUzRW8EUhxqZnKGr8Xpf/Yfx+IaPYdVczCHwW0tM+lAi6hF7J qFwB6A1Xxa8gW6XLkGTcl082J0QIxUriPX4H7AQ8rfXz8CH55nsvMsBQFf6CanpXjFSUeN aLaVlJmrSUTwyzIO+pCxQ7TTmJhr1HpSXgpgDgIISmcrHN5i21OHu5WimvWzrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100886; 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=v7qiAY8VJqUm2qD8urA303ZZHGYQFyPGELI3HR/BMzg=; b=A5lin1M56QDJMrxk0m9zJm0yQ6Gj7lhW14vUK+7UCUtxan2UfQyNLtF5ARFjjKldgZ/WJV 8HKgHI9/Dn58uaBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Marc Kleine-Budde , Jakub Kicinski , Paolo Abeni Subject: [PATCH 06/24] can: mcp251xfd: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:19 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Reviewed-by: Marc Kleine-Budde --- Cc: Marc Kleine-Budde 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 83c18035b2a2..de2ae204beaa 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c @@ -539,11 +539,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 Mon Nov 25 10:39:51 2024 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 B08201D31BE for ; Mon, 28 Oct 2024 07:34:49 +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=1730100892; cv=none; b=hEj6vo5bHwzpqQE3a18o6pYffNZcShJEit0phtjNbiGVgGcLsN517fTzzZTdQAm63uSgLKIReVyWjwJB5HiBOzI7aXrhvCZni4srun9smoK1fEoEcNIrFTyRq4V+KA6HBWFT+LnkQZ/fZCMfb0GwZIXgiqxrdClB/2YM4q1ThLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100892; c=relaxed/simple; bh=UIfp12f6ICg1/fF3nWdK6jYYWW5ZwrHHOvfZ/2sJy54=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=W04KdZXED9qDfDqGSqSnYqagKLpJ4WPR5vBkM0uODQKJfpy13FCnz4azGlgHkYg5I/hHk5ziY/53naCsenqZPV9uOlRhAu8ff8+UjdGafJBB6PdvgqaPObxKW3YV30KXRegOZtnaP/CnC3UK6eL1aDojcm3yTyiqtoqlwDKphsw= 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=LN1WJk9E; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fV7WhHhH; 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="LN1WJk9E"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fV7WhHhH" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100887; 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=UBuM06sYWpJW/gUpuuXSFlaQhARIqOQtwS++UcbYnzM=; b=LN1WJk9E5+JPLxlztImE2RI4VQQ9BjYNW4S28UuUit4RQPbXnfuzsRkALyYzv17sVQ5wV/ 8nrXernaD3lgq78FsTj6DH+MR26g/qeDtiGBfWYmZzATtZ1OPi+cTAkPJxjM0EidWs1hIh UPTby1WtgZsvTA0u6Slb3JGLhk/5nNoiev3VeerbWVI3TVwuAl7hDep7Qdg7kue4Wkr13A 0ZJ+MANQPqYspFa5w0c+YoOrvVJsaUyCvFmtdP3qpKtdv1cKuNGkvCjKSZ1mN1PKigITOr 7CQfImt+bNCuCZ0amQUSjlnrpjI3xd89graenMEH1DKga80UtP15Hnes9NrE7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100887; 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=UBuM06sYWpJW/gUpuuXSFlaQhARIqOQtwS++UcbYnzM=; b=fV7WhHhHWPls7HOvJAAcWSN8u1/zguFoy9O4Dxqmyle70+LM1abyFzzTgG/ANdAj4DqZ/+ VVD5GfbHQVbPfgDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Marc Kleine-Budde , Jakub Kicinski , Paolo Abeni Subject: [PATCH 07/24] can: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:20 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao Reviewed-by: Marc Kleine-Budde --- Cc: Marc Kleine-Budde Cc: Jakub Kicinski Cc: Paolo Abeni --- net/can/bcm.c | 16 ++++++---------- net/can/isotp.c | 10 ++++------ net/can/j1939/bus.c | 4 ++-- net/can/j1939/transport.c | 8 ++------ 4 files changed, 14 insertions(+), 24 deletions(-) diff --git a/net/can/bcm.c b/net/can/bcm.c index 792528f7bce2..2048cbbed138 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -1012,9 +1012,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head= , 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 /* add this bcm_op to the list of the tx_ops */ list_add(&op->list, &bo->tx_ops); @@ -1189,13 +1188,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 319f47df3330..7f97e7f97799 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 Mon Nov 25 10:39:51 2024 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 E8B141D1305 for ; Mon, 28 Oct 2024 07:34:49 +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=1730100892; cv=none; b=hHyNOqOQXmoAjz8xnqgdkEu/DPpXvF/5ACePzA0Urgp8gVuAqw/GgjDNTjMeqdrOKUqfZDuQwhSIaGjSVivBTgyUhZbumwBUgx3EcCpL+RGWzkq0xO+RsGqN9cm6/n4Tyrx4e04ngIvKpZiAJPZgTyfY/hQrZBqdLjWxmJE17eQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100892; c=relaxed/simple; bh=UEEWNr6vkvJ2yuF3etO3unNqtvL1psmqI4ZgW5d28W0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KWBUuRNM9R8CD4vQ9tctqeY5pehCIEJE9bRnKpDgTnQL2FKobY1q0gfVnzdGSMTdPEhEvty4xDvgML22GwcacDGHNEymhMJTI8gfZdkD8s/4TR0ouMJ8OBnkxY3zeJOf+pIJ65gmaapRBU/eVeIN6Xn6esfynBhicy0Gx40zcKE= 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=glQqNMpz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=aTkbuGSq; 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="glQqNMpz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="aTkbuGSq" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100887; 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=ZJBkHtyT4teuZbaM7TI9FQL2VUs8Qow+v09qjqOiNx0=; b=glQqNMpzMM4TkbAI0owjYdwGIM+xdOMzyUUuk+Q6ToDzCxGOt7Ly5IKBwVPJspfewdOUQQ UgjuMy72p/vIMAWPw5LPoF5KfYqwm9TTMmKQb0r4D2ztXtU/xObA/BVc0dFkN+MptRDh2m U1e9wCjlZsdt8abUhrdyycA1qzrI6FHFaw/dc/SEntdi6sqNfexBJLuvxRpV2oEVlW+9nl NnhlES9tRwNyTTV8UDpTeOAqlEJBLzNSNudH+eFHgHrnByCteyIFaOsNAq/KnB3dJ2+M4Y UDFOHTW7UiZUx+o9igbK/hbtrcBsnNWsQ4mzg7DLk7TjjteepNkVAPtrX6eh7w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100887; 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=ZJBkHtyT4teuZbaM7TI9FQL2VUs8Qow+v09qjqOiNx0=; b=aTkbuGSq2i1X3KEMYKVdZf8IEsFU+OGA+eTdvm/8zThVs5sg9Tk+p5jHMDJKlT/zD77RIS fEcQJwLS53mo3BAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 08/24] net: ethernet: ti: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:21 +0100 Message-Id: <800557e9eb5451966ab6a850fc56c4a3f73a40d9.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 cbe99017cbfa..ba5e32366fb8 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -2236,8 +2236,8 @@ static int am65_cpsw_nuss_ndev_add_tx_napi(struct am6= 5_cpsw_common *common) =20 netif_napi_add_tx(common->dma_ndev, &tx_chn->napi_tx, am65_cpsw_nuss_tx_poll); - 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, @@ -2485,9 +2485,8 @@ static int am65_cpsw_nuss_init_rx_chns(struct am65_cp= sw_common *common) dev_name(dev), i); netif_napi_add(common->dma_ndev, &flow->napi_rx, am65_cpsw_nuss_rx_poll); - 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 fdebeb2f84e0..16ca4b1fc01b 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 5fd9902ab181..fe5c32be1ab3 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c @@ -951,9 +951,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 Mon Nov 25 10:39:51 2024 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 EA6861D3644 for ; Mon, 28 Oct 2024 07:34:49 +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=1730100892; cv=none; b=tpmvdwsffzdhX3nq8XXKYCgwVxIUxLY+3CX4C9GRS1va0yEGWZVXJuP3AX01DbsC43bo0lX7Zp9iLOTMjo7L0YC5zWZu/vKhq1RkXI4XEcHZWCiqr6+1jlZN7NC9Juppc0nVknjR2tbOQEpnKWXvYncMWHfQUTdjTrRpbJuX9cM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100892; c=relaxed/simple; bh=AyFqTh/LTXdnFtVjfZsqUZtU1Ntr6JSA0nB/tk5Lovw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UplzCvNBV0FoHt3zjgX4w5mfLp/p2nSBe9UGWFlfE2yaauIomskRmG/H7wA5t22mOB3dfW+yAley+XVXgmCnFvygw7WhW4Om0lZgAwv59MFEaOHZc54J6DRyCdksocnjCZkxp0B3ROAv8TeaadFYoEZzRqOH3o+ZE86UNu7M19I= 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=b3z9JEsN; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MxFHg79Z; 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="b3z9JEsN"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MxFHg79Z" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100888; 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=5fM64bpc0cXbY46rFUm7HVL20B9YCPcyUvXqkWIDluk=; b=b3z9JEsNl8p0Cnn4U5Pur9IjWd7HVUU4nB/We2YjA/aHythZx1TTGOu9sD0v6zikGapx3b MmTkcatUQ7Op0Aesy9TKbWHKvhdBuSKd586SmS9+bEM9ysEvIC2LNFIgWAy+ztKqxMtY2+ 3Z7PzmC48AtCEzc430aLeTaK6USo5pY0lQFu2/BbF6wd6OtQ4SVN9jQn2pWntrLvgXgDAs h5yGRNJU4zbWmVUhZKQ6WFPZIxjSRT124nWosI3F/3M+PQy01UQMQC3GsBbytDApSNVQTm YUOOffs7AzahQha2olmjWTC+zQ9ues56lWAjWt/qrYLko/Sg+4XuzJizsa1XiQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100888; 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=5fM64bpc0cXbY46rFUm7HVL20B9YCPcyUvXqkWIDluk=; b=MxFHg79Z6Ge0F+8kd1x2lPFS1TM4G3MBAfAyGeh7ZzgusZbaXH8ES/h0BfdVhRG6xU6eBk Ncd7t6T7NODlMoDA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 09/24] net: ethernet: cortina: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 73e1c71c5092..5347431a089f 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 Mon Nov 25 10:39:51 2024 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 397CA1D365B for ; Mon, 28 Oct 2024 07:34:49 +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=1730100892; cv=none; b=elobQy4RIIcSlgOadQ3BKE41U5QXz+WhrQBDUuCSBJyhD1+fDvyt8s4X5LHDhPe0Oq2ofiahwwdKg/98Izqyouf/OYAL+85XcVI0ELzCWTu8LPIuHP72021ayUtRE3yzWcEJ2J0N9PMSilfTTO7g9Gddi8lP1ejFZ1HJxBKFISo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100892; c=relaxed/simple; bh=rzqrdnivDl97wmegK5ckmhXV74XxLo/jUNE1guP3qvg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qDNyo5AwRamDE+4R+7eHk9t9dh9g+aJc2no6UwidZsh+6gW837W2pLyBlHSwAxXny9Hsg06ZGccvKxa6JWxLX7JW6v2K5tMdV/F9Agfxmy+sCZjjsH639hHrPQc02GjwtgOMbi4FlPiekbZTRk+bv16HAGnUeZUF8Xq7Wje/4FA= 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=rOw9pOes; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2wMaklpl; 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="rOw9pOes"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2wMaklpl" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100888; 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=DFc6mraY/kK+oDpjLr7TplQK2q1zRBQUEBNW6Bb6d90=; b=rOw9pOeszun7xyHx77M1vd7OfvPAAb4mi9R/V8GgHxXz+DMr7imJteS44nUqg1cgevvc5t 4KYTDOcJN4dPTFEMZLKTGJYK/Fxwu8gEq2cpGYj6D6wOfdwilgekMNWliLay9+d93iRcMe l43jKOwRusszACWziSPp+A1+cZH16IKPIEkkSw2egcRLYAvub7gGeEzkWTGba7HI1ui9rS HSQJiIBqUUTocCewUjJMPDBoVL9ij3Nzhm+VN/TnidSR2lSyZHlhPy/XCryqokclbODjgF kgIcYanROUojxvwgfQuOn1MjKjvzitNjrTLNt14I6F2Og7J8GT2BYBD5CUyh2w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100888; 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=DFc6mraY/kK+oDpjLr7TplQK2q1zRBQUEBNW6Bb6d90=; b=2wMaklplQGgt+gpHV2JJSe+Y+NE3iJbct8EkTTlE4nFVf6TcORd+vf2RORXMdlRwdvSeuj hyuPTrzOWmwQqpBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 10/24] net: ethernet: ec_bhf: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:23 +0100 Message-Id: <4e703b61cdfef59049291a6c3a8558f0ac432409.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 Mon Nov 25 10:39:51 2024 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 9303E1D47B0 for ; Mon, 28 Oct 2024 07:34:50 +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=1730100894; cv=none; b=ChzmDNfhhBf3ZLgzYbamtlEez4a6nwd/saIduYN/YA7YpLGsh33hQIEvqyI2OcLcWg4iRqNlfMWPydFnCb3P7oO+y0rSl0NegKgFUN69oXrnYK/6KXrCOr2DZhLahbKn6XLffJAUhLahH+5Qtx+PoZJLU8bftxLPxRskCWXCVzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100894; c=relaxed/simple; bh=KwVkpb+23KwsjUwiagKn2SiNjubs/wEBZsrHiNYqphk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B/n1L/LLm7hYndeUotj953T6Bg55HDBlQJcR2prWG2x8d8xTBF7UX8XCXiMio8BCUoBbTrDGtFmeE9Luxwc0NaXVd7lg5FIk34kywP5wTNYWSuzOR5erVOF0+pCFjkNu5JoG/QWtDj9PpIlCOGd36ypDIZiZXF67X+gzEkZoKXA= 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=CxkisvMn; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6T4Xk1Cd; 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="CxkisvMn"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6T4Xk1Cd" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100888; 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=GgSbgSUhO2aod2vaYHhL6ohERNVR0p9+JHiiJkBL9Yo=; b=CxkisvMnjh99YJ+yJUtuSQzf0fquHjshaczKKF9sKvBSNYWWqVYNkYMRuA1YWc/6dNmZ1s B+/v1Cg2d91H7iPbUgQz0kplq4OxdEFz6qNZGVTJ7bpAN04zRmelKgm4mK0XEYgCJLHFDP Kvcrai4lFqQvnp3Kgfwd/1VgeLrIksN1igY2LdqzZ9kokBxF4xNcmyE6NHaTPQg3spKp71 1CzQZ+Imwg28p19vTlFxr3MP0aE7njMFPb2fsA5K5Gv1SrHyOGpAZJwpkwdcu6rUUEe9N5 joT90wGiXoxQ9Ha5fe/MtbLhErk/Yxk4d18pPhXVJnTJc9iKrFsPUJruFa7u8w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100888; 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=GgSbgSUhO2aod2vaYHhL6ohERNVR0p9+JHiiJkBL9Yo=; b=6T4Xk1CdPKSv/3MMmsl8bZEuTo2P5S0m+V7cr4Fyy7JG/7mkZrfTfOjqUAGT5Owx5PEDNo 2srXQxh/Ws/AkPDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 11/24] net: ethernet: hisilicon: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:24 +0100 Message-Id: <00397b6bec2694d2249e4d39236e1b42e83ab33e.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 beb815e5289b..bea8b79e69b2 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 Mon Nov 25 10:39:51 2024 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 B61641D5156 for ; Mon, 28 Oct 2024 07:34:50 +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=1730100893; cv=none; b=CyB/m1OZGjjlMMXIxM74ZTXWj+DDi23Ve3lb8EwLjBTTLZJOSa2y1FQw7cdFXR5+qbY9PJP+VsZKzRu9mdzNDs+1DJgvrBUqcYe4/k81y1whsDKxn7Gl6FmqpaKlJhgg9rwR3BGcE/j993JFjLEOrS+S7kYpJ+A4snH3RReS86w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100893; c=relaxed/simple; bh=ShcJLsHx91+2JlgZgzJIEhoY+tzqmgS374Lx5ocZN7M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K5lb8hT6uil72yhAbN1EFxioTGrrGGjOEBVN4FuuvuO1frpTtJPqh+mr8FF6OKrA6sGNK52qWMW8JH5FWTErqUXzUqD7BnhCbIR/pFKg8SizGaqDTDZbAoCTSJF04Z3xXso2LXRReesqgkx/Keb0+vq9hIA2BgLqDZ5lF2OFRw8= 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=Tw6bmISP; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=suvGOUK6; 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="Tw6bmISP"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="suvGOUK6" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100889; 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=ZsQNG14Q324MnNU5r6jpHCOYzSsrtS0Bk0Sr0BZNMBA=; b=Tw6bmISPyPJZjyvK8G9QxQYin37qigyoi5jCeDwwv9hA+gDJVY8lr4ITw2sTuaPB/RqK6+ LMydblaera2u+Gx3JD3JkoTKpXcMqvRVwLKFFXxuT5+V9u4L9Rs+0disOYYgLX3Fl+WC0X B4wQGHEw13uyiPeCdQcGwqbHeRhYJbJ0mNavDGoFcCg5oGkxewSGHx7BANyqCLfzcJVc2s SmDN5eRqDjL6I6ZEJrCl95H1TP/bcG4PqGxKRZzP88jfymEMjVklXineRfcqvFL8yifzIw VMW71GBGtWtp65g7MrziT+vzztyXxUKfE2cH7uM5wW/5VW0Un0hevm1wjtTJBg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100889; 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=ZsQNG14Q324MnNU5r6jpHCOYzSsrtS0Bk0Sr0BZNMBA=; b=suvGOUK6+yfqH171YtBCpf/+8Fy8DWN1dHub3+95hCCHGq4C5iXBRYKKkOBzO/MzNYQchP bQLIyzQz5N4tqVDw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 12/24] net: sparx5: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 f3f5fb420468..89e25292d8f9 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c @@ -356,6 +356,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 Mon Nov 25 10:39:51 2024 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 4BB911D5AB4 for ; Mon, 28 Oct 2024 07:34:51 +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=1730100894; cv=none; b=KBWCMf+PQCHdrMoyrHPmQdxiUI40TlocRHev+MDHZCOpTzhcHkWuaVrt0y3WxJGc6/4cGcv3OmrP5rZF4BGzx1tnJcInPMb8q52scfKQHwQeTswSH0Ac/lMR7LJIp8K8HLK8qjADXAoZ8xeH56wxb96u0fNZSc1S0chpQsJ5ehs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100894; c=relaxed/simple; bh=FgH+4oSFObwGJ6HnAfIGc8i9ehCagLGw5KwoO+DxTqQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OI+QbBRzSmxyRccNN3mMMWiT9g85+a2JvgU0W0tYnzlMEEwl0u4QLKROSmJE8bHffekcG9jBfqydfn5AS4umDe0SEyht+N3boVKFsB/0c0syk3YJrg+h1M289l87uicu+isrfH2xh72hgqJ3tymGtFME1qa13XjjKwNjZYn7nMs= 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=0FTdeYzd; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CCJWymg5; 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="0FTdeYzd"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CCJWymg5" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100889; 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=tTKC6D++uGTdE7vVcbbnaEeewmEp+B/DaXmcW6uXuo0=; b=0FTdeYzd0H8IeImmDi0qKoq5NzGdMZ9cXu1pkgeHRm5F7HfrGw48WOp8JYHInqrdcSqvQW qaWPPcKvRKnJW7IfES0dDpp7X2EoCd1AqoTK/P1uv4w9H+WRUebW6cfwu9b+KhB5Zsqh0O rWi+EswTyMzvyjl1r6muIFBIiYuwh+3YihkfunGo7+TcXawhyD+3Mj3GKEQ25I130aUsDK gmGnZCJ64+AS9rTXp9ByWr5iOVtuz+ZdQ8PwiIszgUb9VASraCypalZmaUNlzgV9rDr6/M j/KsKTMpxfBn7D3rQunrQ5pgoxSzS4ckaZcBfkptb6kN9OaAEwpxHyN6ogBhaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100889; 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=tTKC6D++uGTdE7vVcbbnaEeewmEp+B/DaXmcW6uXuo0=; b=CCJWymg5dmJrFFrp6uQuXwxilNowTQdSn6UqxumhDKiHPnfyH/wov7tUbaM84JL9sryRmb hzUtwSRVBtG/FIAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 13/24] net: ieee802154: at86rf230: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:26 +0100 Message-Id: <89dcfc5c1cbf4c38d72bd565552abd4946aa99a8.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 Mon Nov 25 10:39:51 2024 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 98E331D5CCD for ; Mon, 28 Oct 2024 07:34:51 +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=1730100893; cv=none; b=C9MIHL8wFLAHme2I640jV8EtaNuZMRJhogwL29ULihLlED6XL8j1muOV+SrjRDHbuHzqrzzQ7ebsxqvrN0wKG87/NTIlM1Y5oV/p92z1RqnSFuiLAYaov1ASuR6Vf5POKWdAxZpzbws3ez3BbILjY+Of/SWo4wpg8zXk/Wkt/Lk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100893; c=relaxed/simple; bh=gyrFNuy5vudjM1FLkrlB1tmDnkFne3GntyyK+xSUUIs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gFQSwYCClNdlVZjwXUHTcX2D88XWdu9KzuNJQ42Qa9snpnrDMYWQf6eHH2j+IReWYYvyIcqHajgAZGbT1jEOiZYCPVX4tEnFGKGxMEplU4R0d8Ram3bGS0WK2L1oiLj8gwDedPcWIdoH5qsvST9BRkebr8jDzPot3O/tdNXsFAI= 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=ejWBxQxo; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hAzsxZcL; 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="ejWBxQxo"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hAzsxZcL" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100890; 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=tGSlDHf/SBeslCdjprCChultehdciaufyoVKgGuOcx0=; b=ejWBxQxoFSyUBbDp8E5TOIjyyQYyabsnsZpnPL+gCVBCTNC0D45El141XjSx+baWWDyNTp tNi+2r/2oifi5Wv9mVZRH18Y7Bl1jZ/aITQe3cjps1IAipHdYhFwyEdS7UtMIuVBuDo+Bt lF1ConQdZRtZKyai4sXpA94A04LF0BBs/dlgPLoPuMHnLjNguGTSnhSNET5HHMYX0yBVZM oeralENlDHkiGgTOFfYQE2/OHiznXQ4ZrbPeWMKrmQf90URAkhN+Zg/PFMX8WVkBeHj70+ 7Z1pyd0tS09pYeOkdcqavEAwcBlA5AUShXGPikBd4vNajC4b+98+O0Tu8Sw1fA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100890; 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=tGSlDHf/SBeslCdjprCChultehdciaufyoVKgGuOcx0=; b=hAzsxZcLJRMYO0wcpz0/SjeD6fmVGj0W4UefWgxEil/NAsWN0pL5tkUHA6tCr5qGa3nlBE pfOPlCGuiG1tRHDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 14/24] net: mvpp2: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:27 +0100 Message-Id: <9e05dcbb3bab1cf10dda5b5f0d4c8519f68f4efa.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 3880dcc0418b..03038402957e 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -6914,9 +6914,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 Mon Nov 25 10:39:51 2024 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 2A8941D95AA for ; Mon, 28 Oct 2024 07:34:53 +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=1730100895; cv=none; b=TRxq35/RxnWXyCJ3gl4BVLAwrGVXYJ7Bf+jydExpWx916zIVEPayv5KXyoJyrp9rNBvPKtzbI/o1y6rin2zyampx1vToKyPt2bFR1L3m67UR8SJ4L7mwbRrLIynoXjOVga9MgnNQ9vBRWSyT9K/jfGGWZUp1jIyXeOHCHi2equY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100895; c=relaxed/simple; bh=OQG+UNiCOCkyb6VBoWT6XF6/j3JE/VKNWWuQyWf4gy0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uGZWD7ooVZHWsE1hxwaZbrZWjKMp8V0lVbYry1019i4009SXk18JPAsvd8PAGPa7QtQYSWyJmGHtSy4kaJ7B4Ix3yaq+4UXPfESt605mipsAMJ83k9T5fUSpLDHLsoiQXLuHUh8fbdYIv6uMBK9Lo4c93WmAMyXWNRJlTNLcPms= 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=XB6OGRME; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Qzt2DAH/; 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="XB6OGRME"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Qzt2DAH/" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100890; 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=l8RfN8rOA54I4gGgwr0BwQLnPVnXOBjjm6x4TUe9WjE=; b=XB6OGRMECdmyUGHWpQvVLJgRXyste8lPN/t/rti96RBfRafvSumfOf/kVt7XbPLLrq7ugr ffQk2ZwOnQVpupCEpN19oj89kVWeOX6eK2xARjTONsyT4+2Hsp1xgZ9jUMmXYiain0DBzh JPWOI80hHWDe4aEmMdf1jqDYFVFMw7ixZ2wfWNQWCrOpoKG7FjhVaaIFIew8jvVWfT0ZGw K2wbNRGmoim8dT086MmeMcRYWd1HvdoYYur2IIIDNBXLisylga88TC0tRuhYLytAMGFPYz /OVsCnMIPM8uG4xv8HuUxVZ2gz3VFUL6Vi+8wIxMIpSUBV120ix4jqjhF/LHrw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100890; 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=l8RfN8rOA54I4gGgwr0BwQLnPVnXOBjjm6x4TUe9WjE=; b=Qzt2DAH/Viy2gbOAgwCdGadMovjrlqyvgBj9Jsv7421PC/5EVx6tmr0CubArI/jQxtzVqe tA4a6/ITwxSYlrBw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 15/24] net: qualcomm: rmnet: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:28 +0100 Message-Id: <73546cd88cd51bd19d22c3fd38a8a8492bf8c65c.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 Mon Nov 25 10:39:51 2024 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 2B8CF1D9A41 for ; Mon, 28 Oct 2024 07:34:53 +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=1730100896; cv=none; b=WjAPP/uGe8/g8i1yWPHegr4FzOL8KXaOE1xrZsOVtIWfwu0bMd0kcNTWAltexLeraaza8O/edEuHfKOm1aneO5ZoCZTXfHf5TSmCRsLhe5OEcyAtn8zZf/qeimrDKmw1feV5ZGr1cqvQ9p5BfWXQUx/eQ8oBRAa1fulyW5Wtw+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100896; c=relaxed/simple; bh=albjBGOrXlcjYPXZSQHgCZ9IdrYuovJW+KtvpXDggnI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uJ9DCRoMZnLQDj+w9a1aARi9ugHPgmF+lv6ZkWlkhsLJx1YD4YHQizbsGMGftsJe72f29qYhPeVsKV+tM5XpXprTfTExrA7K8xPUJFP7sq9QaKbg0RVI+hSsol+bbPzgCQvhUf0ib0wOFrBffAjyR5PHtns2Tbec5E3TPHUmXAk= 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=3delRPNF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ylZY3DFX; 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="3delRPNF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ylZY3DFX" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100890; 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=Lv2h/77aH+9nFUo7h9NGs+/N5o8hl722p+7yXY/Iaaw=; b=3delRPNFYYre966VjU1bq+3/ilH+rfPC7bwjQJsni8WtlOdG1d+2KZYgl515nqAOYsYjRi 66qhoUkaVec42XSj1a0HbGgQI75/HjEUIWdpIWe8+Y44IdAOwjPhxBO64ezruZM5BhqqO1 zP22MHwPwrwXdvZuRYcnNZu4GzrX4UbkWC4RUPi1sFFMkLJDmsk+2QFnGYIC4eF0B1+hzx 6yPlldgRqmSeJUNbNFygixU9+2T6VOiMAqK/QEiLl5tfF+1J4hkKT8fHBncG5SuSdQXUHl w1+Sz18Cy/ZtkFxb+wX2oAk5I4M+s9FnAp3RvWUrQ0tKSYhHPDn6sZ7P4CqDSA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100890; 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=Lv2h/77aH+9nFUo7h9NGs+/N5o8hl722p+7yXY/Iaaw=; b=ylZY3DFX5gIB95UcSLARB+ui68h0h+/rb1uTvTwXWHHofSNff1LnKve/67IBC9eSRCbxCO 9Dd6rLWkJ96Jg3Cw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 16/24] net: stmmac: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:29 +0100 Message-Id: <45aca4db7aa93cc60224ed630ef937418870702b.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 e2140482270a..61ed82561168 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3148,8 +3148,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++) @@ -6967,8 +6966,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 Mon Nov 25 10:39:51 2024 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 800BA1DA100 for ; Mon, 28 Oct 2024 07:34:53 +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=1730100895; cv=none; b=pJVkJFJ2d0gzmhgKilCCuqVb22omjo5lJPasuHilsPRiW/2BtWBu2Z2Q09uAwP/xLcjyZqB3yAXuFHQGzMzyE0E0DiqE/B98hd8p+5yJaDhTfZLxZK9woG7Ki3KxiOoYbRBUakpVEd14mS+K9POyN6fRXGfPqSlxQRvPFTJy83c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100895; c=relaxed/simple; bh=k/+b4xdBHMNKHASg6Y/MWnH1t51sY5i1B8fzAQunBmQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IIgu2lCj6IAyIZTaB/AL98qbXAMTpD+RASwYBbIzMsDgH/BjocJkcCPReTvAXPPP80bVqk2LWh6KQk9GxQ920ae3KkLJvEa56tgC464IKQ7TawuPV1fk2ZbzU5wfOcQ14LzZu4qB/35IrYCTekroy2YatIsNNtbVKfAlCt3+SrY= 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=AOdFjRQ2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zoQNfhFd; 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="AOdFjRQ2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zoQNfhFd" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100891; 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=LEebMZUUnqm+N8fGkKxXOzNj0uVNdxtaDjuByeScOX4=; b=AOdFjRQ28euIuq0TlSX9keU44VNLscPykpJK96gV+ZLsj+RjPVjWcfUMK3yhBgjqMS4eVP t2hORDH1ufRU1CocAQLWUgeD+LDuNgBzXRuvyUBXHsWCccFz9XK10+3h+GyQGalljRBTzG V07DXRkbmv5gODbcX9n0rIRWyJ/zHfxWXazSg/l1PsRvkIcKjePsWxuC75K60porq0H5ZF dS0lhAXzaina0dG6ujIgnwgxwRa6Gng/n+uEp4nnaHT6AOBrSZ6+J3H9SiqcqwSeq1z3iz ESlbQdK9E3yDJVaqbgPVV7hbBEGL+D3DCGPnAJwCsrjLVbeNmX00Y7jtSx8quQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100891; 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=LEebMZUUnqm+N8fGkKxXOzNj0uVNdxtaDjuByeScOX4=; b=zoQNfhFdJw9EoV72XsztryK6VBW46DS/D5MV9Mi2JpKTH2EVEAE+70Rl6GMmOa046xyX06 L6TJASV4J/P0ZDCA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 17/24] net: fec: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:30 +0100 Message-Id: <37f6a100ed534ed45cc818ea106f3d8e15afbed6.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 4cffda363a14..b357967d56b6 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -738,8 +738,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 Mon Nov 25 10:39:51 2024 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 80CAB1DA634 for ; Mon, 28 Oct 2024 07:34:53 +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=1730100896; cv=none; b=sN6tBQV6fLKCU10A29jIZgONNYpMGJCa/6iJV7+SvUKXe28XjO944KCarsLq9sYKN6eDTTztpE1FIceLRuOqsmfafpQg5pcAPjK20Aaww6I6CjlvrZ/Sw+XIxSdVQKKmTUaV0EdhTgGPDpK3ferLGr+dskwbKrMC51IYQ5omivM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100896; c=relaxed/simple; bh=IIbEppl4dS+chwmBL45RLcZjLxLuKIjbYMvPgSIRg+w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C0qgRzKQJMS+xbFj0Utaq8FRlKbsfAn725IZz5VdKRKj/4gYb3Un7IhSwtiV7zzCUKUlRe5qFiqfPhWtl361f1go/ta+0G/BatbYH7dXCqZ3iIJB/GhsRrCeOywk/qHRf6wk+WnOd2QOGsxvkQyQtp4hx40uPppZiLpRp1SXqt4= 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=d6Clmt90; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WKiJKrfq; 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="d6Clmt90"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WKiJKrfq" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100891; 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=LJdI/mozZHXhIuU2am3kttDkMcd+QLHW2Wp2sHPuTUc=; b=d6Clmt90z4tM0ANE9itUdXnm1TKSEoiFc/5LwsB1i0dBsTb1hnTCuK3GdnRTQDO5s/DBd4 SkbX6F52AYVOzdC3CyH+fwKvcSXpy1Fl3z1YaI+SvA7LxyiNjiFTjmYmLESs8Quv1MLTv/ Z0wue0GsWc1afyS0lyF3M/XZgz8BaT1gewDrKesRFlFMSdjsPufDyt9qD933jj8xAkUM8I v6DmOP9BPYUGj/Mo2fBd7/ulwkxFPoFy1CTS4p7eIDs3QWD+jT1tGz4r+9CgYgTH8vQVNJ wLv2KlDWVSW0Ks0NOGQkCLYqbe1dgFvT1ti+GOXqhekNxjNgz1XeCkgN5YkzjQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100891; 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=LJdI/mozZHXhIuU2am3kttDkMcd+QLHW2Wp2sHPuTUc=; b=WKiJKrfqIRrEvd3kHACthQ4R1va8cfjJgpe3wZifAat/SnrDNO35tZFW5R4lvJnb6tO1Kg xEKi6yrblff+c2DA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 18/24] net: wwan: iosm: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:31 +0100 Message-Id: <5b39405467f80bb8e4c83108df12cd2f4a0193e6.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 Mon Nov 25 10:39:51 2024 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 9C7C21DD554 for ; Mon, 28 Oct 2024 07:34:53 +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=1730100896; cv=none; b=OmUpxlc/Yvxpd0H5gdYbbvZToZC+sg3ekbeHmVsgDDAyLcXNcinwbnHMmixjMGC24S+h8FCctImf8CAsaBsoQCQN/LlLzM9gBtD3F2koCRbQitNylmyXNMQe6z14BKq07ZYsXOYMloKuovArBQvdJxGQ5F62Oc6V9vIdaGquWO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100896; c=relaxed/simple; bh=q85l8Rn54jUqp09xOP9w1ZewUSf4Q6vKvgjhh7tfDi8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=j9r6dSfc2yr+52d04JlJ74DdhcVnSG9RsY1P2k0YED6Fn/qLCkV8da3Il1F08B8vQUFKTKt5gtL1Knb5JKvL+Sik88q/9WfvlSx0tRwuN5Q0cbrnAHXzRe3KTTSFMeoZrffPcvbxpEFmzFmyouDXzHDqRZCqAzw6FNm3ldGNedE= 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=O/CZaGLC; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4CQnBKyO; 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="O/CZaGLC"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4CQnBKyO" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100892; 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=XyzJyFR/q82cIdy9DlEUJKpApgLq4Sn0n6FEbCe/fz0=; b=O/CZaGLCYsdv/6x//9IkN3MDOvHsHZ5JmWsDeKt/wcf0w3bzinY35edPkW0wYdok7S8apW 0O0M2eEbx+lafLwyHj0jS61a5kwDyNtKq7tV5gKPZNAoswCy9NEtvdM5l+JgdpyzcgwGD5 jE7mWoYr70nbQBCUPkbTB9PNL9Aoelfpq4Hdc8cMYX5MeaifhqzbIBabUP7+9BD5x70QXU OFjg5E47U10ny5t6HEN0Rf7RGzYWdK7XEl9+vRbyeSOhHZ24XvbB8ITwx3iN+Ml+xhuAjF LXpuQ0CPRCKXK+NVWot5oaPv3myfDpmAcpjagr0pwJaCpF6wgYplEkCJv4Xj0g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100892; 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=XyzJyFR/q82cIdy9DlEUJKpApgLq4Sn0n6FEbCe/fz0=; b=4CQnBKyOIkW/P5tkSUh6OLMxChh4drX2hePBe/e4D8l5Xd4xEneCihIHtvX2s2i8Y/7sHu wPOqCdCE/h/iDaDQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Oliver Neukum , Jakub Kicinski , Paolo Abeni Subject: [PATCH 19/24] net/cdc_ncm: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 Mon Nov 25 10:39:51 2024 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 036C21D7999 for ; Mon, 28 Oct 2024 07:34:54 +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=1730100896; cv=none; b=W7IYqhj+yD4VsfoEyRY1ArjT1vRPy4s+eV8A/2U9B1VOw5omLYizC/EUpZO4ygpOIfNaEn2SnMxbJ5eulGCDzHMWWuLkggSOZ6kAXrwMwqO+NNKNSQKkwhxJYYA0s8j3PadBdCb6kLcEzl78lFWGi6Qst3jTSipULE1TUJ+U8i4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100896; c=relaxed/simple; bh=eP4YwOV+ik9NVBmN7eiWnS9JIDlXfnnKX5pn2uw33Mo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XryGqXvE7ylkg5vYTI/K5PyekfTcTkSXopQMYF5aJPVdtmcnxCDLzNVIG25CmhjiDxxW70fCx9jOUnYeccf74Wq3nu7CRYywfvsR6xMc5eepJnMbYiLvRS3qCxUjBmaLUVwoGDqi90Fku076h7fEQEuuvC7reOTAKilRKj6g0yg= 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=G2hRmndz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=oZnQfhDS; 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="G2hRmndz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="oZnQfhDS" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100892; 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=OS9JAYKlBmv1/1WNFHjpDSeNZZjMoTsDV1AeduiJ7Rs=; b=G2hRmndzIh3C5UAxGGNjuvoakgHfiuXb9YoPduqBS4CytNv6UV35L2Tt7rgeBD9uUY5LXf XEA65jfW0fghvpsCT2xcYRQZt0Q9NLA+SkWkYI9nNTndmmBz2MSgzEJaymOOJUBTgb9BGb 8b86R4rAZk6i1a+Ol1NWj8+WMhwg/Evub+nJExtY8K+wimSo4x/t7G8QQ0kZksBMVzTGvg sRw4yGZ+7WgoC1mXZiGUAT9tgO/jUKtOyGRMMBYDtu4qfm/zOGpkYp8chD/pX4XYKo/eQw qSiEMlzPAobSuLJ9XQhLUTZFpmoh0KpigV+aU4rFxbwaeNyOXnyNBx21K6Uu8A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100892; 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=OS9JAYKlBmv1/1WNFHjpDSeNZZjMoTsDV1AeduiJ7Rs=; b=oZnQfhDSoXbjeYOb7Qmkghj8BgtmsAojxdlLuGhBtBOX8RwWFIcM8uU/Az9jCYuET1KuUk L8SoSbHKYkM56JBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Kalle Valo Subject: [PATCH 20/24] wifi: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:33 +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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 f0e528abb1b4..3695f79fec95 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -5509,10 +5509,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 Mon Nov 25 10:39:51 2024 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 B7E921DF729 for ; Mon, 28 Oct 2024 07:34:54 +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=1730100897; cv=none; b=NPQrbBKN0L5jTrm+UklF0TD9MzIp0JdfBUs8f7JbrkCcKoskaUxIN8RAVKNI7X8ci4IodXaPRZDaK0hzcLmx7q5kFBKqddYlgVp39+8Gg9508G8gLFr+GZXNdJqYVeDN9bDuPuxANdo3huzbggOeYddVjdijzTbx6prw5cQvusQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100897; c=relaxed/simple; bh=1a8MV3w+xC5HrzzJFCpxnU/jGz3Zj2tPw2Sc3a7IPIE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TzdeSocaklbcLckkJA+j4cM7QDM52yrNtSSmBuNYCivP/fnsZNUn+VGMCVOR7KWfFtPJJ4GJgRbKV6HPBAQ8vhbrIwJ+X+ZGViLsQrBECWgnc3b/7wZXqbcg+Yjpn466B0wy/k4H2yjDsHB7ezJHH2iK1o35Qtf6qsfjWhiAvH4= 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=Xxg4on47; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Cx7rcIzM; 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="Xxg4on47"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Cx7rcIzM" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100892; 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=XxqQCk6RJhkTJsofe3LYEK4ElLPZkvK8TQzsS4QZDX4=; b=Xxg4on47coUGZKOwjRJgj7KfLOiOJCR61fm0g8KE5gjkzxPRxkCjpA14nQeM8uGP0TgG4B DjKfMyjTZW5GpU8+0cBAEWYkTID+2rSh989PWa5baaMy3O38TjwxrJXGOU3JLjAmZOkZ+r 1K6IQq7ecBkVgaMRHG5rIZunbIBkxNXa7X5gSf6mgYN0Zuf9kwsfoh+W6njnz3OtKxP77L /i8WcQV0WCsOGi/hjSdh0cQN+T7kKti3aXKiZRIhpDgTpadrWqqoQ7SfKFY2gnsxceRzo4 CajYfkMJNxkV1DL7xHFpHJBy1ERalO1bT9kQe1FyOdadHHflG0GwPmyAcYfAbA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100892; 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=XxqQCk6RJhkTJsofe3LYEK4ElLPZkvK8TQzsS4QZDX4=; b=Cx7rcIzM4eUjgKvOkRXBACW2+eNh+gPCYHSQf3D1+lo4i0TfxGb8I83M9Z5Io+Wn/9XAPb vFTHcQVPLsLjgzAA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Kalle Valo Subject: [PATCH 21/24] wifi: rt2x00: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:34 +0100 Message-Id: <49f2bce487f56eb2a3ff572ea6d7de0a43560c0f.1729865232.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" There is a new function hrtimer_setup() which will replace hrtimer_init() and also set the timer callback function with additional sanity checks. This 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. Because only usb/mmio variants of this driver use hrtimer, ideally all hrtimer code should be moved in those specific parts. However, all usage of hrtimer_cancel() should be moved as well, and that is not so obvious to do. With the lack of hardware to verify any non-trivial changes, introduce a dummy timer callback function and use hrtimer_setup() instead of hrtimer_init(). Signed-off-by: Nam Cao --- Cc: Kalle Valo --- drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/w= ireless/ralink/rt2x00/rt2x00dev.c index 9e7d9dbe954c..187701a8f8c8 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1362,6 +1362,11 @@ static unsigned int rt2x00dev_extra_tx_headroom(stru= ct rt2x00_dev *rt2x00dev) return rt2x00dev->tx[0].winfo_size; } =20 +static enum hrtimer_restart rt2x00lib_dummy_timeout(struct hrtimer *timer) +{ + return HRTIMER_NORESTART; +} + /* * driver allocation handlers. */ @@ -1391,8 +1396,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, rt2x00lib_dummy_timeout, CLOCK_= MONOTONIC, + HRTIMER_MODE_REL); =20 set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags); =20 --=20 2.39.5 From nobody Mon Nov 25 10:39:51 2024 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 E1DDA1DF73A for ; Mon, 28 Oct 2024 07:34:54 +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=1730100897; cv=none; b=IXd9pGWIWumwJ4NWEIZyMZokN7x4c9jH9z+3Ruc8QxyulDlygL9lmCpwVUyCeUax4UYxsSFdgoC2roXE2OvUivev+vrKFb7KKvDb2WCm+lKmcOPY0qkztU8JJ8L9UFSHUqd40NF2C7TuOiIlTKi9655thd6bNkX7szybSpJdyb4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100897; c=relaxed/simple; bh=VmkTmwcgVzhe9ycIhehKyPzkdH7l5VJ1pDloqDmkPdM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ryWdcAzjIFBRZj9m1ab8X9SCDNnVEHrfgYUUwQsRSXIQ2akzeH+cs5NaV+Tm660VG8u6X8XIl4yHPdJ7/MFPYAsraOCx05n8MTJh26Q0BO6venQgsQrwDuGMy2ztL66/tltLnQK1+wRr+DjxhPGj1QC5weh4nRE1gcdft2S0rJE= 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=QDSGQAN0; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ByjsyEvY; 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="QDSGQAN0"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ByjsyEvY" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100893; 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=qB+IC+lNc5s7NmD1jfQf+sbexs+9okrxF59BOPlS5FQ=; b=QDSGQAN0HkM2VqQfPbSndPWtWIdQTgoA9uTrmVssH+7r2hXrVSDRXGvTQakt4pHgKN2H8E 33gzygABLzKKmsDqm2+fhfW1JR0HSvas3/Rk4Ho580Ky8l9oJ2/iuTmmYGd8apX/wlitcT HRc/pIrVqiidcRrwJcU5Lq5quLyxBEZ9y1PUHpZ+xY1rpYW0AjJw6Rvj9KZuhYKUYxyfv8 /F0yptGYWLTd/jbMpeRmeD9kzTlpcKsHfqNOYrQMBOGbiERkWeCXFH5CK47dqCPpoX1IsX Ax2vyQrFnXa/gtpSlXaVFQVdjSJCoJeuPvymgVAGyy74xl6g9ncLTD28Dp++bw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100893; 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=qB+IC+lNc5s7NmD1jfQf+sbexs+9okrxF59BOPlS5FQ=; b=ByjsyEvYorV2rmcaG9/eXCel5BAzNPJ2rS4gcdSw1F/fmo/sOZAe0nap25pSyReTUbdXMD p8K3gwDuTVIo0HBA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 22/24] igc: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:35 +0100 Message-Id: <13545b09f6ce1a19db0dd3d66e8fffbcf0dc56a1.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 6e70bca15db1..dd5190a2a4f0 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -7103,8 +7103,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 Mon Nov 25 10:39:51 2024 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 952141DF963 for ; Mon, 28 Oct 2024 07:34:55 +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=1730100897; cv=none; b=TK8BQTggajGawOyldHv7mdIx5H8eR8TEK4h1eQNSvfq9vKwQV/cQ54GcC9xSZlcx3b3vvenHgyrN0MqEM4uBgKB9EleiISdQSEtBmhK6bhB/spBEh8CtWIa0Ayi3CHPP3jZkyBr83qWn4C8DBxxZ9Fxu1ZFGQxJihVP0e9YKet4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100897; c=relaxed/simple; bh=HR7i5HgsvpMEKoCk8cMkJUzpoOTjIdVJsVilamWu4q8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ggpOzldJfUnv8TjaCp29rL8JNLusbsQIfFWuwq/GO7jl5gNumCpXFq05DqNruWatoEBWueoCGojXSOCbb/wgiS2Qc2klkSp85ytws4cmQAWNtw61EiOxZbLyq/JnazkHKiZiJpot6YTKv1C3GM93EfGnE9z5c9qUF1ZSnA8ocA8= 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=YJ6pQjkk; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Inn5sSdh; 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="YJ6pQjkk"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Inn5sSdh" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100893; 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=y0YY4YX/eXNm+SsADhJXuP6fTNpj76qLiAdcRLa92EU=; b=YJ6pQjkkuFiOxSYYRaG9f98svzwTptkpr/BnIAHPXPfM5Y07DJTfahR8/vT4yoQYvize18 hZXIFXcCubQuVuTK830Bkdbtbhd6b+Vi6V46G4aoILKcDFj+qVMwJ7NDksIwiScqRJMZro D5X3kXhlv+FrHI/nmsTBQIYE5aNo+s/72pR5HIlVDSZjX647SwjchI37jhAc0hPPDVpcBL 9ensWyblNOlapEVEdLMvmnM4lxcg0YmEYTJRuybEp2vYqbQCgPkbRhXEbotJ0hVUgKh+45 yZFuWElffaop6Gu+tgBqHXdEw3TWtct7Irw8Cr0uj2SPvssaJV9ik6kaExpi3A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100893; 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=y0YY4YX/eXNm+SsADhJXuP6fTNpj76qLiAdcRLa92EU=; b=Inn5sSdhIHRBFCZpv3ELJg0AGHM8Fj656N7sHm/u8xXAZw+ho4YBlGQi7SC6+fATezOQyb vFKWpgF1uSVIksAA== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 23/24] octeontx2-pf: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34:36 +0100 Message-Id: <3bf0e5d21365ac965e65374857ff67c465134301.1729865232.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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. 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 Mon Nov 25 10:39:51 2024 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 D18E91DF974 for ; Mon, 28 Oct 2024 07:34:55 +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=1730100898; cv=none; b=oGdXWintKFix1W8T6URMeXDKEUhrPjjeVRNbeH+IYjdFpomUHIdYTd3kRIswVbcnKqaBhIGINWwe7DaXwNpgCZXsEHYaUKX8mBLaHvxBoL2pS55XKQDJPZMv4ygRQNAFj0Hc+/lrbnGcy+xJmtrHoKrM3X+ubcCXMpSH/+wCxWE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100898; c=relaxed/simple; bh=g4MSRZ1ND/c/40scFoJuTaPHPPlbESMSFba+htRDtz0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s5P5+hpAojR62zTZBgx42k8+l1OvUhh5K4mSnirm708BzhpM45Pzaz5LsRI3EgmnihrpnrvCuX8wBpp0skBJP3Sj9yyFTQZCWJ/1hdGiJ/kDm8xGCJjo5lz1mypM5T2SqEp78xkAJDzLuOJMHMlr/9oUOPNfZXOM7erBBcXNcAM= 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=XTjiX5JJ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Qaqrkilh; 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="XTjiX5JJ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Qaqrkilh" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100894; 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=4Mss6JzSI/n43HDWVW5WEmUllYHkMzaraJ7yyKBDbCw=; b=XTjiX5JJZOMlDBltE2AFwIhsLclMsLLEydRsNDFM4nm0FvSyGAcNr09pMlN3ZVc8xGKm0v JPvwQqb3OdZZjSB5BhSMf576nf5+tx+CBBaOjGu3U7ekksknIw47QQh6Aw7uD04Jo3VPMS w68yuz67gDGpy8/CUBg1vZW1XSWrBUHsUe9AqsNXwq39rs6xQZ7231ju3D7VrB1Q6y4jBg d536yec2X1YLJ5L2ONFFi0PxBDe8W6oS2s5YJfEEB+/j6kqVQjMsuHQSz6VLKsN+PvYOHm LKsTt6RS1R7orNPb+7vv5eDbcTO6CrkTsET9ZzoyCmPDDkc9sKhUp3IoJ9pA3w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100894; 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=4Mss6JzSI/n43HDWVW5WEmUllYHkMzaraJ7yyKBDbCw=; b=QaqrkilhnMScyHaWC7fAs8Y2T++dVRxKr4+/teO4fJW0g97N1xfCCaGturEdTmCrmRr1k1 u1FtJclk6v5wffDg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jakub Kicinski , Paolo Abeni Subject: [PATCH 24/24] xfrm: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:34: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" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Signed-off-by: Nam Cao --- Cc: Jakub Kicinski Cc: Paolo Abeni --- net/xfrm/xfrm_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 37478d36a8df..ee0581d45d9c 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -669,8 +669,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