From: Petr Mladek <pmladek@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Rob Landley <rob@landley.net>,
Francesco Valla <francesco@valla.it>,
linux-kernel@vger.kernel.org, linux-embedded@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Tim Bird <Tim.Bird@sony.com>
Subject: Re: [PATCH] init/main.c: log initcall level when initcall_debug is used
Date: Thu, 3 Apr 2025 11:49:43 +0200 [thread overview]
Message-ID: <Z-5Zt66D3xm6bHOY@pathway.suse.cz> (raw)
In-Reply-To: <20250403000935.e48f8552231a28d06765b777@linux-foundation.org>
On Thu 2025-04-03 00:09:35, Andrew Morton wrote:
> On Thu, 3 Apr 2025 01:42:46 -0500 Rob Landley <rob@landley.net> wrote:
>
> > On 4/2/25 21:55, Andrew Morton wrote:
> > > Please review and test this fixlet:
> > >
> > > --- a/init/main.c~init-mainc-log-initcall-level-when-initcall_debug-is-used-fix
> > > +++ a/init/main.c
> > > @@ -1217,7 +1217,7 @@ trace_initcall_finish_cb(void *data, ini
> > > static __init_or_module void
> > > trace_initcall_level_cb(void *data, const char *level)
> > > {
> > > - printk(KERN_DEBUG "entering initcall level: %s\n", level);
> > > + pr_debug("entering initcall level: %s\n", level);
> > > }
> >
> > How do I tell kconfig to remove all pr_blah() below loglevel X so they
> > aren't compiled into the kernel taking up space? I thought that was the
> > reason for switching to the pr_thingy() macros (it was in the old -tiny
> > tree Mackall walked away from) but last time I tried to do it in vanilla
> > I couldn't find the knob or trace the relevant plumbing...
>
> Ask the maintainer :)
>
> I can't see a way. Maybe it was never merged.
If I read the definition of pr_debug() correctly then it should
become nop when CONFIG_DYNAMIC_DEBUG is not defined, look
for "pr_debug" and "no_printk" in include/linux/printk.h.
That said, I have never checked this. Another condition is
that DEBUG must not be defined. But I guess that it is
the default.
Best Regards,
Petr
next prev parent reply other threads:[~2025-04-03 9:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-16 20:50 [PATCH] init/main.c: log initcall level when initcall_debug is used Francesco Valla
2025-04-01 17:57 ` Bird, Tim
2025-04-03 20:04 ` Francesco Valla
2025-04-03 2:55 ` Andrew Morton
2025-04-03 6:42 ` Rob Landley
2025-04-03 7:09 ` Andrew Morton
2025-04-03 9:49 ` Petr Mladek [this message]
2025-04-03 8:27 ` Geert Uytterhoeven
2025-04-03 20:11 ` Francesco Valla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-5Zt66D3xm6bHOY@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=Tim.Bird@sony.com \
--cc=akpm@linux-foundation.org \
--cc=francesco@valla.it \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox