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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53470CDB466 for ; Sun, 21 Jun 2026 09:38:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B227B10E33B; Sun, 21 Jun 2026 09:38:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="kHYbAcsD"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id A609210E337; Sun, 21 Jun 2026 09:37:53 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id BA1C8600AF; Sun, 21 Jun 2026 09:37:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C4931F00A3A; Sun, 21 Jun 2026 09:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782034672; bh=eq4Jiz0A0s0y1CCaKrigK8iMCmKO2KO/DMw+O1PS1ZY=; h=Date:From:To:Cc:Subject:References; b=kHYbAcsD3riuZyE8yw/zGyX4OGv8E29ntBrV/psMay3TNT67fA5gNBpeHGFBeZ/12 2Ay7PRmR+s6HdarptXq0OjoszuRK4hDjuFDr5zqy5M5pwo3OOG5Rfwzz1hG/+dQ1n8 CM2zwSeAYz4lQYZRNadhemupSTJhYAVEj8Z/JGBsC+uxY4TS20hXDjW9EjrTZX/Dl+ vMXqPLpJ/wkow6elNFJjsfNE/3ih99IbbRotQdZuC4nu/UA/y3tJKjSTogiiW5YYf5 87SMm3+n4xuUToS7j7SvNUKsWt0yz2IfUnDNb9wlqNTm+yoVD5272meD4iMEV5O7Pw ZebFVZP2gqGBg== Received: from rostedt by gandalf with local (Exim 4.99.3) (envelope-from ) id 1wbEd1-00000001qU9-0cPr; Sun, 21 Jun 2026 05:38:11 -0400 Message-ID: <20260621093811.007634476@kernel.org> User-Agent: quilt/0.69 Date: Sun, 21 Jun 2026 05:34:31 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Linus Torvalds , Sebastian Andrzej Siewior , John Ogness , Thomas Gleixner , Peter Zijlstra , Julia Lawall , Yury Norov , linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, linux-usb@vger.kernel.org, linux-ext4@vger.kernel.org, linux-nfs@vger.kernel.org, kvm@vger.kernel.org, intel-gfx@lists.freedesktop.org Subject: [PATCH 1/2] tracing: Move non-trace_printk prototypes back to kernel.h References: <20260621093430.264983361@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Steven Rostedt In order to remove the include to trace_printk.h from kernel.h the tracing control prototypes need to be moved back into kernel.h. That's because they are used in other common header files like rcu.h. There's no point in removing trace_printk.h from kernel.h if it just gets added back to other common headers. Prototypes are very cheap for the compiler and should not be an issue. Signed-off-by: Steven Rostedt --- include/linux/kernel.h | 18 ++++++++++++++++++ include/linux/trace_printk.h | 17 ----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e5570a16cbb1..c3c68128827c 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -194,4 +194,22 @@ extern enum system_states system_state; # define REBUILD_DUE_TO_DYNAMIC_FTRACE #endif +#ifdef CONFIG_TRACING +void tracing_on(void); +void tracing_off(void); +int tracing_is_on(void); +void tracing_snapshot(void); +void tracing_snapshot_alloc(void); +void tracing_start(void); +void tracing_stop(void); +#else +static inline void tracing_start(void) { } +static inline void tracing_stop(void) { } +static inline void tracing_on(void) { } +static inline void tracing_off(void) { } +static inline int tracing_is_on(void) { return 0; } +static inline void tracing_snapshot(void) { } +static inline void tracing_snapshot_alloc(void) { } +#endif + #endif diff --git a/include/linux/trace_printk.h b/include/linux/trace_printk.h index 3d54f440dccf..879fed0805fd 100644 --- a/include/linux/trace_printk.h +++ b/include/linux/trace_printk.h @@ -35,15 +35,6 @@ enum ftrace_dump_mode { }; #ifdef CONFIG_TRACING -void tracing_on(void); -void tracing_off(void); -int tracing_is_on(void); -void tracing_snapshot(void); -void tracing_snapshot_alloc(void); - -extern void tracing_start(void); -extern void tracing_stop(void); - static inline __printf(1, 2) void ____trace_printk_check_format(const char *fmt, ...) { @@ -176,16 +167,8 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); #else -static inline void tracing_start(void) { } -static inline void tracing_stop(void) { } static inline void trace_dump_stack(int skip) { } -static inline void tracing_on(void) { } -static inline void tracing_off(void) { } -static inline int tracing_is_on(void) { return 0; } -static inline void tracing_snapshot(void) { } -static inline void tracing_snapshot_alloc(void) { } - static inline __printf(1, 2) int trace_printk(const char *fmt, ...) { -- 2.53.0