[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFmZ0a1I+PvyPvne@hirez.programming.kicks-ass.net>
Date: Tue, 23 Mar 2021 08:33:37 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Valentin Schneider <valentin.schneider@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] static_call: fix function type mismatch
On Mon, Mar 22, 2021 at 10:42:24PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.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.
Powered by blists - more mailing lists