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