Re: [PATCH v8 20/21] printk: Deprecate the kernel.printk sysctl interface

From: Joel Granados
Date: Wed Dec 17 2025 - 15:23:33 EST


On Wed, Dec 17, 2025 at 11:04:43AM -0500, Steven Rostedt wrote:
> On Wed, 17 Dec 2025 15:33:42 +0100
> Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>
> > > > OK, what about the following?
> > > >
> > > > pr_warn_once("printk: The kernel.printk sysctl is deprecated and will be removed in 2036.\n");
> > > > pr_warn_once("printk: Use kernel.console_loglevel or kernel.default_message_loglevel instead.\n");
> > > I meant it more as a long line in the code. Not a long line in the
> > > log. Like this:
> > >
> > > pr_warn_once("printk: The kernel.printk sysctl is deprecated. Instead, use "
> > > "kernel.console_loglevel or kernel.default_message_loglevel.\n");
> > >
> > > Its still long, but more manageable.
> >
> > Please do not split long messages, as it makes it harder to find them
> > in the source tree.
>
> Right. Linus has stated that strings should not be split just because they
> go over the column limit.

Oops, my bad. In that case, just leave it in one line.

pr_warn_once("printk: The kernel.printk sysctl is deprecated. Instead, use kernel.console_loglevel or kernel.default_message_loglevel.\n");

I would even try to make it shorter. Do you actually need the "kernel"
string? If it still make sense without explicitly stating the "kernel"
dir, then I would shorten it to this:

pr_warn_once("printk sysctl is deprecated. Use console_loglevel or default_message_loglevel insetad.\n");

Best
--

Joel Granados

Attachment: signature.asc
Description: PGP signature