Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp188640ioo; Thu, 26 May 2022 01:07:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj+4tJXvAMOjyIqSQogYUaVyHN7T7ff9hRo/Jh8IZ96F7kj5hEuSIP+wcvS/N8XuS71UZt X-Received: by 2002:a63:4e20:0:b0:3f6:52e5:e4cc with SMTP id c32-20020a634e20000000b003f652e5e4ccmr28991117pgb.421.1653552441557; Thu, 26 May 2022 01:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653552441; cv=none; d=google.com; s=arc-20160816; b=P3iDr/dTlwYN+49iqxHT44zLCZmNvYDz4QyzgF3uJnxdIc8E6yN0wWbesjIrEIRr+C i79Zi7OUpL2mdPr14GE+7Xs+ZNVbCwo91pQgSdLN9qtstXFKAvaI2Z9gmBGOwWzWMPbC ATwZqtg49VRu6JFlRrLNr0vemqhk4XNftSiXZ6LaS+VIuk+hXRIkLEwad7wVGlmQAn3T tCiOnt5WPYNdqNaEBtUCZJBG3OmxOHCpfUcab3AHkAobJfvS8YIhrqKpR325E0nE53PC gQbqI41wD4aIeJX7gqLVTLtjNCQBlXyH8Mcx63/OFCqZ6/r15Shk1TlRnkaSyXQTUYcX S6fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=r5GsFYTT2JyzTtVWAuif0cVxrSBjOx6Rg/XIhLZFtqQ=; b=aRiAxwjhfo1K9RV3VH/BPGApbuwWsgp0Tq74uFoN8ZfPtKRgtOqiY10/lELP4mb/ba zs8C/qQT09xDBQFWKC9rl084KkGTsTO+KN7eclykTfywFFTVpTRnfswkMS+joR5DGWn7 XMSYumbrsr8eJEvXM/C0/PRx7K9a9un/hivAsvsXztVrIGSbdqFTY7c+JCp0ZvLniA9h FvF1sao4cGJrw0IDTwZJy9ZtZcUN07e9E12xSkQLFDRscuG5TJrFFlUoA790wIqj22iy VVOPegnuNRww/YyK9XVX4MSBsPNWjSA71Ittd1X9bsKrdAv/6Xhib4WwMTk2QekUdKOi X+Eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a056a00114f00b0050dfc410ab6si1164053pfm.142.2022.05.26.01.07.08; Thu, 26 May 2022 01:07:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242539AbiEXXR0 (ORCPT + 99 others); Tue, 24 May 2022 19:17:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237123AbiEXXRY (ORCPT ); Tue, 24 May 2022 19:17:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C488671A2A for ; Tue, 24 May 2022 16:17:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7BAB761800 for ; Tue, 24 May 2022 23:17:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43F92C34117; Tue, 24 May 2022 23:17:20 +0000 (UTC) Date: Tue, 24 May 2022 19:17:18 -0400 From: Steven Rostedt To: Chengming Zhou Cc: mark.rutland@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, kbuild-all@lists.01.org, lkp@intel.com Subject: Re: [PATCH] ftrace/fgraph: fix increased missing-prototypes warnings Message-ID: <20220524191718.5d906700@gandalf.local.home> In-Reply-To: <20220506032737.23375-1-zhouchengming@bytedance.com> References: <20220506032737.23375-1-zhouchengming@bytedance.com> 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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The change this fixes was merged into the ARM tree and I do not have that code, so I can not apply this. -- Steve On Fri, 6 May 2022 11:27:37 +0800 Chengming Zhou wrote: > After commit e999995c84c3 ("ftrace: cleanup ftrace_graph_caller enable > and disable") merged into the linux-next tree, the kernel test robot > (lkp@intel.com) has send out report that there are increased missing-prototypes > warnings caused by that commit. > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 \ > O=build_dir ARCH=sh SHELL=/bin/bash kernel/trace/ > warning: no previous prototype for 'ftrace_enable_ftrace_graph_caller' [-Wmissing-prototypes] > warning: no previous prototype for 'ftrace_disable_ftrace_graph_caller' [-Wmissing-prototypes] > warning: no previous prototype for 'ftrace_return_to_handler' [-Wmissing-prototypes] > warning: no previous prototype for 'ftrace_graph_sleep_time_control' [-Wmissing-prototypes] > > BTW there are so many missing-prototypes warnings if build kernel with "W=1". > > The increased warnings for 'ftrace_[enable,disable]_ftrace_graph_caller' > is caused by CONFIG_FUNCTION_GRAPH_TRACER && !CONFIG_DYNAMIC_FTRACE, > so the declarations in can't be seen in fgraph.c. > > And this warning can't reproduce on x86_64 since x86_64 select > HAVE_FUNCTION_GRAPH_TRACER only when DYNAMIC_FTRACE, so fgraph.c will > always see the declarations in . > > This patch fix the increased warnings by put the definitions in > CONFIG_DYNAMIC_FTRACE although there are no real problems exist. > > Signed-off-by: Chengming Zhou > --- > kernel/trace/fgraph.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c > index 289311680c29..2cd374294be7 100644 > --- a/kernel/trace/fgraph.c > +++ b/kernel/trace/fgraph.c > @@ -30,6 +30,7 @@ int ftrace_graph_active; > /* Both enabled by default (can be cleared by function_graph tracer flags */ > static bool fgraph_sleep_time = true; > > +#ifdef CONFIG_DYNAMIC_FTRACE > /* > * archs can override this function if they must do something > * to enable hook for graph tracer. > @@ -47,6 +48,7 @@ int __weak ftrace_disable_ftrace_graph_caller(void) > { > return 0; > } > +#endif > > /** > * ftrace_graph_stop - set to permanently disable function graph tracing