From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Valentin Schneider <vschneid@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>
Subject: Re: [PATCH v1 1/1] sched/fair: Mark cfs_bandwidth_used() and m*_vruntime() with __maybe_unused
Date: Tue, 12 Nov 2024 17:18:56 +0200 [thread overview]
Message-ID: <ZzNx4D5lWVhTG7bk@smile.fi.intel.com> (raw)
In-Reply-To: <xhsmh7c98d65h.mognet@vschneid-thinkpadt14sgen2i.remote.csb>
On Tue, Nov 12, 2024 at 12:48:42PM +0100, Valentin Schneider wrote:
> On 05/09/24 20:12, Andy Shevchenko wrote:
> > When cfs_bandwidth_used() is unused, it prevents kernel builds
> > with clang, `make W=1` and CONFIG_WERROR=y:
> >
> > kernel/sched/fair.c:526:19: error: unused function 'max_vruntime' [-Werror,-Wunused-function]
> > 526 | static inline u64 max_vruntime(u64 max_vruntime, u64 vruntime)
> > | ^~~~~~~~~~~~
> > kernel/sched/fair.c:6580:20: error: unused function 'cfs_bandwidth_used' [-Werror,-Wunused-function]
> > 6580 | static inline bool cfs_bandwidth_used(void)
> > | ^~~~~~~~~~~~~~~~~~
> >
> > Fix this by marking them with __maybe_unused (all cases for the sake of
> > symmetry).
> >
>
> I assume that's with CONFIG_CFS_BANDWIDTH=n? Looks like
> cfs_bandwidth_used() uses are tucked away under helpers that themselves
> only really do something for CONFIG_CFS_BANDWIDTH=y, so you could remove
> the CONFIG_CFS_BANDWIDTH=n definition of cfs_bandwidth_used() directly.
Thanks for looking into this!
> This compiles:
okay, consider then my patch as a report. Can you submit your version as you
seems much more familiar with this code than me?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-11-12 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 17:12 [PATCH v1 1/1] sched/fair: Mark cfs_bandwidth_used() and m*_vruntime() with __maybe_unused Andy Shevchenko
2024-11-08 9:30 ` Andy Shevchenko
2024-11-12 11:48 ` Valentin Schneider
2024-11-12 15:18 ` Andy Shevchenko [this message]
2024-11-12 19:36 ` Valentin Schneider
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=ZzNx4D5lWVhTG7bk@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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