From patchwork Thu Oct 31 15:14:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nam Cao X-Patchwork-Id: 13859088 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0462EE6B247 for ; Fri, 1 Nov 2024 10:08:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E6DA910E982; Fri, 1 Nov 2024 10:08:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.b="pW+zf7nx"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OAUdZbzr"; dkim-atps=neutral Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F98610E079 for ; Thu, 31 Oct 2024 15:15:10 +0000 (UTC) From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730387709; 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=wSeQQ+/UoF5zygXiJ8vWE36+Ix/J13zBcX6GURu7TTA=; b=pW+zf7nxpvKL293ERZvvkwqWdm8sTJU22dfYTvgmDpLaTBAjpODBvgHjspRQUpOxT2Xkk3 wN7cUjgQB7Wzx+BfHqJpqfqnl3whMltT1B4R6JpdkAklNuv5fISyon0ClgYH1Mm8Datz0t OGuLRyqIKoCRXDm1GeLJ1z7j0HvEwG03s3jx320laE9UbmLIQUWvNk73I/RP22Wi8OO9BM bT+pgEONX7owIuipx8vPYVfYKLzOgbmi++QBfxZF208RvJjPlmzU05qTcvIbur1HpxU2Z4 mzaQYDrdNV64NzCpPI4sMWDeEl8tCiO7YirWqaL8DeR60Rrz4hRbQa/pJzrAZw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730387709; 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=wSeQQ+/UoF5zygXiJ8vWE36+Ix/J13zBcX6GURu7TTA=; b=OAUdZbzrqi7ivU7nui/YFiCV2Rtbq2Djbjl4fqTRc+FfLabBbIJupRYnsEzp3+vUNCOW58 ubtuPIlXxGOv9PAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Jani Nikula , intel-gfx@lists.freedesktop.org, Sean Christopherson , Paolo Bonzini , x86@kernel.org, Jakub Kicinski , Kalle Valo , Jens Axboe , Christian Brauner , Peter Zijlstra , John Stultz , Nam Cao , Oliver Hartkopp Subject: [RESEND PATCH v2 13/19] timers: Switch to use hrtimer_setup_sleeper_on_stack() Date: Thu, 31 Oct 2024 16:14:27 +0100 Message-Id: <299c07f0f96af8ab3a7631b47b6ca22b06b20577.1730386209.git.namcao@linutronix.de> In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 01 Nov 2024 10:08:01 +0000 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" hrtimer_setup_sleeper_on_stack() replaces hrtimer_init_sleeper_on_stack() to keep the naming convention consistent. Convert the usage sites over to it. The conversion was done with Coccinelle. Signed-off-by: Nam Cao --- kernel/time/hrtimer.c | 5 ++--- kernel/time/sleep_timeout.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 1d1f5c03673c..69430467a17d 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -2138,8 +2138,7 @@ static long __sched hrtimer_nanosleep_restart(struct restart_block *restart) struct hrtimer_sleeper t; int ret; - hrtimer_init_sleeper_on_stack(&t, restart->nanosleep.clockid, - HRTIMER_MODE_ABS); + hrtimer_setup_sleeper_on_stack(&t, restart->nanosleep.clockid, HRTIMER_MODE_ABS); hrtimer_set_expires_tv64(&t.timer, restart->nanosleep.expires); ret = do_nanosleep(&t, HRTIMER_MODE_ABS); destroy_hrtimer_on_stack(&t.timer); @@ -2153,7 +2152,7 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode, struct hrtimer_sleeper t; int ret = 0; - hrtimer_init_sleeper_on_stack(&t, clockid, mode); + hrtimer_setup_sleeper_on_stack(&t, clockid, mode); hrtimer_set_expires_range_ns(&t.timer, rqtp, current->timer_slack_ns); ret = do_nanosleep(&t, mode); if (ret != -ERESTART_RESTARTBLOCK) diff --git a/kernel/time/sleep_timeout.c b/kernel/time/sleep_timeout.c index 3054e5232d20..dfe939f6e4ec 100644 --- a/kernel/time/sleep_timeout.c +++ b/kernel/time/sleep_timeout.c @@ -208,7 +208,7 @@ int __sched schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta, return -EINTR; } - hrtimer_init_sleeper_on_stack(&t, clock_id, mode); + hrtimer_setup_sleeper_on_stack(&t, clock_id, mode); hrtimer_set_expires_range_ns(&t.timer, *expires, delta); hrtimer_sleeper_start_expires(&t, mode);