From: Peter Zijlstra <peterz@infradead.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Valentin Schneider <valentin.schneider@arm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] static_call: fix function type mismatch
Date: Tue, 23 Mar 2021 08:33:37 +0100 [thread overview]
Message-ID: <YFmZ0a1I+PvyPvne@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210322214309.730556-1-arnd@kernel.org>
On Mon, Mar 22, 2021 at 10:42:24PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The __static_call_return0() function is declared to return a 'long',
> while it aliases a couple of functions that all return 'int'. When
> building with 'make W=1', gcc warns about this:
>
> kernel/sched/core.c:5420:37: error: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Werror=cast-function-type]
> 5420 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
>
> Change all these function to return 'long' as well, but remove the cast to
> ensure we get a warning if any of the types ever change.
I still think it's utter batshit.
Please explain which architecture ABI is affected and why the warning is
sane.
prev parent reply other threads:[~2021-03-23 7:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 21:42 Arnd Bergmann
2021-03-22 23:30 ` [tip: locking/core] static_call: Fix " tip-bot2 for Arnd Bergmann
2021-03-23 7:37 ` Peter Zijlstra
2021-03-23 15:49 ` Peter Zijlstra
2021-04-09 11:30 ` [tip: locking/core] static_call: Relax static_call_update() function argument type tip-bot2 for Peter Zijlstra
2021-03-23 7:33 ` Peter Zijlstra [this message]
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=YFmZ0a1I+PvyPvne@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.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®