Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2104136rwd; Wed, 17 May 2023 05:58:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43e/cCPdUjSepHx3MbMD25w0aL31QsPngwLv/dJaEUVovXVnNWQs7uJvUuX0gVxaNzn6L4 X-Received: by 2002:a17:90a:2f85:b0:24c:5e6:7035 with SMTP id t5-20020a17090a2f8500b0024c05e67035mr39701871pjd.30.1684328329121; Wed, 17 May 2023 05:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684328329; cv=none; d=google.com; s=arc-20160816; b=GIq4Rg2BJBkujazq6Eo9Yx7KTyYaAHHpWr5fA+1OsGfDxlplmnrU5T6ke+03h+V8vJ p77ahe+46dO/G67ZnksKs1ybompO/qBp3XGMZUJnfbY/RQqcAMBCoZCpc7RZvKRyjHyw yoNVQyEoByTZZaS1/CEKp7z+5OmnN+mYFUvttVoBbO9mRWn2G7cHFvRUNy+EEcvkUhF2 JQ4RWv/IQA0ifDf6Fxq5get13CJ/0XUqDKKaFc64v0PRHu1riHEaf1H1aPZIoaHOke8c L50bd/Lu2YDXnMDePPVptbsX11aIBsSCoO2YLdxi3AI7PQXEIq90aXp6OkeM3hkl+30b viLw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=OuIEu6F5BFvCAxHcFZZLm43U7wswi6l9e4j6OGTguP0=; b=EzSxfg1qFKnT2FbBAODH7YqA5ZtiyMRzMPOm652BcAH5T2O9K/+1yl4CMap9HHy8BU zTt9IaMoSQpre8F/pOcPmxftJgsN+rgzzCSHkEAOl+X5ymr5cwkXsYzs6fVlxgSKV4vI 4JLq2g80J4UOUilGL0EctGbkFoQcsSuVH3RGncYX/rzJS8udig6a2Jb1VAoI4schX4DV 8H39XIZHuPep4Wu1BEV/YRz9hwX54v7A8bBe9q0/WKtTz2xoNPY5R0bawUL5Cg/1WDdQ 2uITyRG/zt0lVg4VEll7iDOihSYnEWwmiUhBPsYrL8LYzokNVDMFFkQRzv/0Ur9Qy2D0 y2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NE2fqtYq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p9-20020a17090adf8900b002509d96227esi1668814pjv.173.2023.05.17.05.58.37; Wed, 17 May 2023 05:58:49 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NE2fqtYq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231774AbjEQMrh (ORCPT + 99 others); Wed, 17 May 2023 08:47:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231759AbjEQMr3 (ORCPT ); Wed, 17 May 2023 08:47:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BFA712C; Wed, 17 May 2023 05:47:28 -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 C05BD646CD; Wed, 17 May 2023 12:47:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB90FC433EF; Wed, 17 May 2023 12:47:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684327647; bh=NTct6PtjEtuPM5wlTLSiKa6Oz8nevVfIM3Gsc53yGng=; h=From:To:Cc:Subject:Date:From; b=NE2fqtYq5UrGRjgu9TsVFmF3Q0M2nt7uV0wRr//Fs9MOw+oFwH1in5Vtj+NEFRHO8 Usx11UMUFfFJq6gLSiF4HVKCDHoU814M6SC6NFTVmQah+i/xFJki4Ohni3CJNlgiex ZJR78/8DCfipgYdoReKXPt+L3DCtV1v8ClacFS9/YgdQd92nT+w37T1lGwiK/eyUk1 gf1MW9X1MvJ+qIRhE2Nc078U5PwcWGDVk6olMWi8+XvjSr/ZBmC4MABzfCR3SOkDBI NeqM1VvceE615MHVjXdzDvXMabe8bOV5hwLRFk5QjYMRF0Mbd+K73A1X56vCUEgDUP oXw2Te19MbvmQ== From: Arnd Bergmann To: Steven Rostedt , Masami Hiramatsu Cc: linux-trace-kernel@vger.kernel.org, Arnd Bergmann , Luc Van Oostenryck , Kees Cook , Bart Van Assche , Sami Tolvanen , "Peter Zijlstra (Intel)" , linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] tracing: make ftrace_likely_update() declaration visible Date: Wed, 17 May 2023 14:47:12 +0200 Message-Id: <20230517124721.929540-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 From: Arnd Bergmann This function is only used when CONFIG_TRACE_BRANCH_PROFILING is set, and the declaration is hidden behind this Kconfig symbol, which causes a warning if disabled: kernel/trace/trace_branch.c:205:6: error: no previous prototype for 'ftrace_likely_update' [-Werror=missing-prototypes] Move the declaration out of the #ifdef to avoid the warning. Signed-off-by: Arnd Bergmann --- include/linux/compiler.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 947a60b801db..d7779a18b24f 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -12,11 +12,10 @@ * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code * to disable branch tracing on a per file basis. */ -#if defined(CONFIG_TRACE_BRANCH_PROFILING) \ - && !defined(DISABLE_BRANCH_PROFILING) && !defined(__CHECKER__) void ftrace_likely_update(struct ftrace_likely_data *f, int val, int expect, int is_constant); - +#if defined(CONFIG_TRACE_BRANCH_PROFILING) \ + && !defined(DISABLE_BRANCH_PROFILING) && !defined(__CHECKER__) #define likely_notrace(x) __builtin_expect(!!(x), 1) #define unlikely_notrace(x) __builtin_expect(!!(x), 0) -- 2.39.2