[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251227162711.742407c4@gandalf.local.home>
Date: Sat, 27 Dec 2025 16:27:11 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Yury Norov <yury.norov@...il.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Andrew Morton
<akpm@...ux-foundation.org>, Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Christophe Leroy
<chleroy@...nel.org>, Randy Dunlap <rdunlap@...radead.org>, Ingo Molnar
<mingo@...nel.org>, Jani Nikula <jani.nikula@...ux.intel.com>, Joonas
Lahtinen <joonas.lahtinen@...ux.intel.com>, David Laight
<david.laight@...box.com>, Petr Pavlu <petr.pavlu@...e.com>, Andi Shyti
<andi.shyti@...nel.org>, Rodrigo Vivi <rodrigo.vivi@...el.com>, Tvrtko
Ursulin <tursulin@...ulin.net>, Daniel Gomez <da.gomez@...nel.org>, Greg
Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki"
<rafael@...nel.org>, Danilo Krummrich <dakr@...nel.org>,
linux-kernel@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-modules@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v4 7/7] kernel.h: drop trace_printk.h
On Sat, 27 Dec 2025 14:35:52 -0500
Yury Norov <yury.norov@...il.com> wrote:
> The difference is that printk() is not a debugging tool.
Several developers will disagree with you. In fact, Linus has said he uses
printk() as his preferred debugging tool!
The only reason to have printk.h in kernel.h is because it *is* used for
debugging! If it wasn't used for debugging, then you could simply add
printk.h for those places that needed to use printk(). But because it is
one of the most common debugging tools, having it in kernel.h is useful, as
you don't want to have to add #include <printk.h> every time you added a
printk() for debugging purposes (same is true for trace_printk()).
Yes, it is also used for information. But if that's all it was used for,
then it wouldn't need to be in kernel.h. It could be a normal header file
that anything that needed to print information would have to include.
-- Steve
Powered by blists - more mailing lists