From patchwork Wed May 17 12:47:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 95233 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1124873vqo; Wed, 17 May 2023 06:12:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4sM27u7qIww7EhbE2TYy7szi5lNn/CpJS55o3QiJ1xCSEFF1F+luIAl7tYDMs7eEojry8/ X-Received: by 2002:a05:6a20:3956:b0:106:30c5:3d02 with SMTP id r22-20020a056a20395600b0010630c53d02mr13598346pzg.40.1684329125524; Wed, 17 May 2023 06:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684329125; cv=none; d=google.com; s=arc-20160816; b=wk2FHnlRQ2j07KJ3k4C1tIZpd0G4Wz7irYXFbjOh8h0Z8eD/ypkOxCtIZvLD9u16i6 Q/DhQ+mPPjW91gealJHM/2cBSO/2QyhYbjSmNjYBvwFI8ymT/qqVJxjioRZ5k0G/dZ/g DtHJF2tpRAesq/WC9KTFd3PV64HB7Zqq4em1BDcf8vidXBU7urtOS4Oub+tYgKogxhOt 2+VrMrjU2auw2XVFRiENaqvBZFB5ScD1SFi0UrSsmHAadqrtyFGbTh1dJeSPq8gtWCun zhc3j1lrT+Jnx8QhGmU20l98GUfu3seYhp81f2Clz8NDA0amJYIbK9zD36S+NKea9dVb uTZw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a630007000000b0052c7c1eb769si21064158pga.856.2023.05.17.06.11.52; Wed, 17 May 2023 06:12:05 -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 S231776AbjEQMri (ORCPT + 99 others); Wed, 17 May 2023 08:47:38 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766147097367285821?= X-GMAIL-MSGID: =?utf-8?q?1766147097367285821?= 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 Reviewed-by: Steven Rostedt (Google) --- 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)