Re: [Question] sched: rt.c: kernel-doc warning

From: K Prateek Nayak

Date: Mon Oct 12 2026 - 05:46:17 EST


Hello Manuel,

On 10/5/2026 12:57 PM, Manuel Ebner wrote:
> [You don't often get email from manuelebnerli@xxxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hi,
>
> I'm trying to fix built warning and stumbled over this one:
>
> $make W=1 -j8 > make_output.txt
> In file included from kernel/sched/build_policy.c:52:
> kernel/sched/rt.c:12:18: warning: ‘max_rt_runtime’ defined but not used [-Wunused-const-variable=]
> 12 | static const u64 max_rt_runtime = MAX_BW;
> | ^~~~~~~~~~~~~~
>
> I just can't make sense of this, because max_rt_runtime is used later in the
> file - see diff.
> What am I missing?

Any chance you have both CONFIG_RT_GROUP_SCHED and CONFIG_SYSCTL
disabled in your .config?

In that case, max_rt_runtime is never used by anything that gets
built in and the compiler complains. You can annotate it with
__maybe_unused to keep the build happy in those cases.

--
Thanks and Regards,
Prateek