From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CF17C433DB for ; Mon, 22 Mar 2021 22:01:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBD77619A3 for ; Mon, 22 Mar 2021 22:01:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230230AbhCVWAy (ORCPT ); Mon, 22 Mar 2021 18:00:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:53452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbhCVWAo (ORCPT ); Mon, 22 Mar 2021 18:00:44 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F6B9619A3; Mon, 22 Mar 2021 22:00:42 +0000 (UTC) Date: Mon, 22 Mar 2021 18:00:40 -0400 From: Steven Rostedt To: Arnd Bergmann Cc: Ingo Molnar , Arnd Bergmann , "Peter Zijlstra (Intel)" , Adrian Hunter , Tobias Klauser , Wei Yang , Chengming Zhou , "Naveen N. Rao" , "Paul E. McKenney" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ftrace: shut up -Wcast-function-type warning for ftrace_ops_no_ops Message-ID: <20210322180040.77a00e86@gandalf.local.home> In-Reply-To: <20210322215006.1028517-1-arnd@kernel.org> References: <20210322215006.1028517-1-arnd@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Mar 2021 22:49:58 +0100 Arnd Bergmann wrote: > From: Arnd Bergmann > > 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