[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210322180040.77a00e86@gandalf.local.home>
Date: Mon, 22 Mar 2021 18:00:40 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>, Arnd Bergmann <arnd@...db.de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Tobias Klauser <tklauser@...tanz.ch>,
Wei Yang <richard.weiyang@...ux.alibaba.com>,
Chengming Zhou <zhouchengming@...edance.com>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ftrace: shut up -Wcast-function-type warning for
ftrace_ops_no_ops
On Mon, 22 Mar 2021 22:49:58 +0100
Arnd Bergmann <arnd@...nel.org> wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> With 'make W=1', gcc warns about casts between incompatible function
> types:
>
> kernel/trace/ftrace.c:128:31: error: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)' [-Werror=cast-function-type]
> 128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
> | ^
>
> As the commet here explains, this one was intentional, so shut up the
> warning harder by using a double cast.
Bonus points for reading the comment ;-)
I'll take this patch for the next merge window, thanks!
-- Steve
Powered by blists - more mailing lists