From nobody Mon Nov 25 11:32:59 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 4792D190660 for ; Mon, 28 Oct 2024 07:36:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100969; cv=none; b=dYQJ9sKiZZBTawoQKwLVy/QhjFK+7vIvYvIZO5aDf6GHyK0icCI36oVGAo5qHDZGr8MHFqkPTHtDD+CPRbZYX4yPx6BirmFvEPxYzX+3eQkyf7llAIhpQV8KOFVxDeWBo7RKb6a6iAvOJrW0jXWwedd65JUZ0zhT3N53slGoJt8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100969; c=relaxed/simple; bh=KikKFLZqaa9ycKVeV+0nyckQjJ6PXSzbyoR+NC//ZcA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WbX4zMaTv2oaKK3nENhTwFP1/Mm4rt0ZXmXfUbX666MS0w5mLDaQiltQ4UCbCGsPLJRLxg80wwWdq8l5Y0BUB+DlIKcFSm6lGMeoWoL5BRZZMwW1aHTg7o+GmarEF9xwWOfVRa0e9v3xDXd3s2RbZwKaSQgk2KXMMFQppnuA0S8= 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=34/XkFd+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=E8pJhW/U; 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="34/XkFd+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="E8pJhW/U" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100965; 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=87KJS+Yd7dmWBG2TJWh52GT7rKaHpnvi/1NPPdJ2+sQ=; b=34/XkFd+BH4tScQhAkmEf89QYaQ5lWvQ3PPKfTj4EH361c05IPeiW9kOHtxxLCmxabPd8J sUWjjH2VxzVEWQw+ciPkRcYgDMJgBeBeaJSAXcFdpi7VAbpeXGVi1+w5djcsLYan7IpsuH ThXCdW3iRESbOb6/Z8MMVsnYeoo/zxeFbyzrsmAhBGqtOI2z9vnkU8JatixnSgyz38+tLR 7O1g1bGkLt4qtFX74CW1D3dDgmuRi9fYN+hcqj/ddmgRiNJAjAtfiIQNRbk8n2KW8qkrcn l7WgHst0kQz4guXSN/R2h05zz1xfz0zpKUuV9x5Eb3UFXsUTIUm5GpGwguU/XA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100965; 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=87KJS+Yd7dmWBG2TJWh52GT7rKaHpnvi/1NPPdJ2+sQ=; b=E8pJhW/UzdYpXY1vwk17DZgCAcEv+b+uySvE1Qfy8wGAq149sYQEcUs0PD/VAOdQAFAjxc l4zenc9fRTlZuiAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao Subject: [PATCH 03/12] hrtimers: Merge __hrtimer_init() into __hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:47 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" __hrtimer_init() is only called by __hrtimer_setup(), therefore simplify by merging __hrtimer_init()'s code into __hrtimer_setup(). Signed-off-by: Nam Cao --- kernel/time/hrtimer.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 45225fdf7cd2..cf362d93a323 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1540,8 +1540,9 @@ static enum hrtimer_restart hrtimer_dummy_timeout(str= uct hrtimer *unused) return HRTIMER_NORESTART; } =20 -static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, - enum hrtimer_mode mode) +static void __hrtimer_setup(struct hrtimer *timer, + enum hrtimer_restart (*function)(struct hrtimer *), + clockid_t clock_id, enum hrtimer_mode mode) { bool softtimer =3D !!(mode & HRTIMER_MODE_SOFT); struct hrtimer_cpu_base *cpu_base; @@ -1574,13 +1575,6 @@ static void __hrtimer_init(struct hrtimer *timer, cl= ockid_t clock_id, timer->is_hard =3D !!(mode & HRTIMER_MODE_HARD); timer->base =3D &cpu_base->clock_base[base]; timerqueue_init(&timer->node); -} - -static void __hrtimer_setup(struct hrtimer *timer, - enum hrtimer_restart (*function)(struct hrtimer *), - clockid_t clock_id, enum hrtimer_mode mode) -{ - __hrtimer_init(timer, clock_id, mode); =20 if (WARN_ON_ONCE(!function)) timer->function =3D hrtimer_dummy_timeout; --=20 2.39.5