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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E0B4C433EF for ; Fri, 15 Apr 2022 21:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237335AbiDOWAN (ORCPT ); Fri, 15 Apr 2022 18:00:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbiDOWAL (ORCPT ); Fri, 15 Apr 2022 18:00:11 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02922338B1 for ; Fri, 15 Apr 2022 14:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description; bh=h/fJAssHuhHtEQkbuzibG/c6MWf07PdZ913rUat+g0s=; b=jUdPCbAMk62xXwyXqzOgd1bK+F 7rWq5HJIjzAVDVmoKivikcmya7dWZFWu+PkvlaLtPrOpx5VWS4GUiH8trlCW1kvDqRufSp8eesHk7 fOktGD0VAEQuve7aNVCrRPh+8WrblztLOtI7DU2VaVyw+2yJbK7uRCprdgfx1iFMW93R43RA4W3XT /CdOqHOt3TcPphI085kLdlZYbdf/6Dro2sremKayILqSSbHq0NyW7escHqaJ43Glm17HJqOaHredO ovYlOkxNmZ0D3oVsaU9d9Kp6GafLmCFafKjt2fBDaTdpIJ0XPmh6Vn0VJtTksdCpljxaBDOTvzeL8 1uFMzimA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfTwc-00BRmR-Pw; Fri, 15 Apr 2022 21:57:34 +0000 Date: Fri, 15 Apr 2022 14:57:34 -0700 From: Luis Chamberlain To: Steven Rostedt Cc: YueHaibing , mingo@redhat.com, xiaowei66@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] ftrace: Fix build warning Message-ID: References: <20220407074612.16608-1-yuehaibing@huawei.com> <20220407105917.715eaa2e@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220407105917.715eaa2e@gandalf.local.home> Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 07, 2022 at 10:59:17AM -0400, Steven Rostedt wrote: > On Thu, 7 Apr 2022 15:46:12 +0800 > YueHaibing wrote: > > > If CONFIG_SYSCTL and CONFIG_DYNAMIC_FTRACE is n, build warns: > > > > kernel/trace/ftrace.c:7912:13: error: ‘is_permanent_ops_registered’ defined but not used [-Werror=unused-function] > > static bool is_permanent_ops_registered(void) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > > kernel/trace/ftrace.c:89:12: error: ‘last_ftrace_enabled’ defined but not used [-Werror=unused-variable] > > static int last_ftrace_enabled; > > ^~~~~~~~~~~~~~~~~~~ > > > > Move is_permanent_ops_registered() to ifdef block and mark last_ftrace_enabled as > > __maybe_unused to fix this. > > > > Fixes: 7cde53da38a3 ("ftrace: move sysctl_ftrace_enabled to ftrace.c") > > Signed-off-by: YueHaibing > > --- > > kernel/trace/ftrace.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > Acked-by: Steven Rostedt (Google) Queued onto sysctl-testing. I have one more fix I just posted for this too. Luis