From nobody Mon Nov 25 13:36:22 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