From nobody Mon Nov 25 12:53:02 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