From: Sergey Shtylyov <s.shtylyov@auroraos.dev>
To: Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Sergey Shtylyov <s.shtylyov@auroraos.dev>
Subject: [PATCH] tick/sched: make kernel parameter skew_tick boolean
Date: Thu, 1 Oct 2026 23:24:09 +0300 [thread overview]
Message-ID: <20261001202417.73273-1-s.shtylyov@auroraos.dev> (raw)
The kernel parameter skew_tick requires an integer value, despite being
boolean in nature. Convert the static variable sched_skew_tick to *bool*
(while at it, annotate it as __ro_after_init) and thus use kstrtobool()
to parse the parameter's value (the values 0 and 1 should keep working
as before); also stop ignoring the value parsing errors as it happened
before (when skew_tick() always returned 0)...
Found by Linux Verification Center (linuxtesting.org) with the Svace
static analysis tool.
Suggested-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
---
The patch is against the timers/nohz branch of the tip.git repo.
kernel/time/tick-sched.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index a7893a079a83..1083eede34fc 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -1475,13 +1475,11 @@ void tick_irq_enter(void)
tick_nohz_irq_enter();
}
-static int sched_skew_tick;
+static bool sched_skew_tick __ro_after_init;
static int __init skew_tick(char *str)
{
- get_option(&str, &sched_skew_tick);
-
- return 0;
+ return kstrtobool(str, &sched_skew_tick);
}
early_param("skew_tick", skew_tick);
--
2.55.0
reply other threads:[~2026-10-01 20:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261001202417.73273-1-s.shtylyov@auroraos.dev \
--to=s.shtylyov@auroraos.dev \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@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®