mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Weißschuh (Schneider Electric)" <thomas.weissschuh@linutronix.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	 Kieran Bingham <kbingham@kernel.org>,
	John Stultz <jstultz@google.com>,
	 Thomas Gleixner <tglx@kernel.org>,
	 Anna-Maria Behnsen <anna-maria@linutronix.de>,
	 Steven Rostedt <rostedt@goodmis.org>,
	 Masami Hiramatsu <mhiramat@kernel.org>,
	 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	 Frederic Weisbecker <frederic@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	"Thomas Weißschuh (Schneider Electric)"
	<thomas.weissschuh@linutronix.de>
Subject: [PATCH 07/12] hrtimer: Don't zero-initialize ret in hrtimer_nanosleep()
Date: Wed, 11 Mar 2026 11:15:16 +0100	[thread overview]
Message-ID: <20260311-hrtimer-cleanups-v1-7-095357392669@linutronix.de> (raw)
In-Reply-To: <20260311-hrtimer-cleanups-v1-0-095357392669@linutronix.de>

The value will be assigned to before any usage.
No other function in hrtimer.c does such a zero-initialization.

Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index b94bd56b739f..226cac8c82cc 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -2328,7 +2328,7 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode, const clockid
 {
 	struct restart_block *restart;
 	struct hrtimer_sleeper t;
-	int ret = 0;
+	int ret;
 
 	hrtimer_setup_sleeper_on_stack(&t, clockid, mode);
 	hrtimer_set_expires_range_ns(&t.timer, rqtp, current->timer_slack_ns);

-- 
2.53.0


  parent reply	other threads:[~2026-03-11 10:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 10:15 [PATCH 00/12] hrtimer, timekeeping, tracing: various cleanups Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 01/12] scripts/gdb: timerlist: Adapt to move of tk_core Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 02/12] tracing: Use explicit array size instead of sentinel elements in symbol printing Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 03/12] timer_list: Print offset as signed integer Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 04/12] timekeeping: auxclock: Consistently use raw timekeeper for tk_setup_internals() Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] timekeeping/auxclock: " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 05/12] timekeeping: Mark offsets array as const Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 06/12] hrtimer: Remove hrtimer_get_expires_ns() Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` Thomas Weißschuh (Schneider Electric) [this message]
2026-03-12 11:25   ` [tip: timers/core] hrtimer: Don't zero-initialize ret in hrtimer_nanosleep() tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 08/12] hrtimer: Drop spurious space in 'enum hrtimer_base_type' Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 09/12] hrtimer: Drop unnecessary pointer indirection in hrtimer_expire_entry event Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 10/12] hrtimer: Mark index and clockid of clock base as const Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 11/12] hrtimer: Remove trailing comma after HRTIMER_MAX_CLOCK_BASES Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-03-11 10:15 ` [PATCH 12/12] hrtimer: Add a helper to retrieve a hrtimer from its timerqueue node Thomas Weißschuh (Schneider Electric)
2026-03-12 11:25   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260311-hrtimer-cleanups-v1-7-095357392669@linutronix.de \
    --to=thomas.weissschuh@linutronix.de \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=jan.kiszka@siemens.com \
    --cc=jstultz@google.com \
    --cc=kbingham@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®