[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFmavWCgUOOfibXR@hirez.programming.kicks-ass.net>
Date: Tue, 23 Mar 2021 08:37:33 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: linux-kernel@...r.kernel.org
Cc: linux-tip-commits@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Ingo Molnar <mingo@...nel.org>, x86@...nel.org
Subject: Re: [tip: locking/core] static_call: Fix function type mismatch
On Mon, Mar 22, 2021 at 11:30:07PM -0000, tip-bot2 for Arnd Bergmann wrote:
> The following commit has been merged into the locking/core branch of tip:
>
> Commit-ID: 335c73e7c8f7deb23537afbbbe4f8ab48bd5de52
> Gitweb: https://git.kernel.org/tip/335c73e7c8f7deb23537afbbbe4f8ab48bd5de52
> Author: Arnd Bergmann <arnd@...db.de>
> AuthorDate: Mon, 22 Mar 2021 22:42:24 +01:00
> Committer: Ingo Molnar <mingo@...nel.org>
> CommitterDate: Tue, 23 Mar 2021 00:08:53 +01:00
>
> static_call: Fix function type mismatch
>
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Ingo Molnar <mingo@...nel.org>
> Link: https://lore.kernel.org/r/20210322214309.730556-1-arnd@kernel.org
So I strongly disagree and think the warning is bad and should be
disabled. I'll go uncommit this patch.
Powered by blists - more mailing lists