mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: 9l@9lo.re, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] include: linux/printk.h: allow forcing log level per file
Date: Thu,  5 Feb 2026 18:11:43 +0100	[thread overview]
Message-ID: <20260205171147.3096490-1-a.fatoum@pengutronix.de> (raw)

We support defining DEBUG or VERBOSE_DEBUG to increase the log level per
file, but we lack a way to decrease the log level.

The latter could be useful when shotgun debugging with all debug logging
enabled, as otherwise some debug output may drown out everything else.

To support this, allow LOGLEVEL to be defined per file. We don't expect
that any files committed to tree would do this, but it may turn out to
be useful during debugging.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/linux/printk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/printk.h b/include/linux/printk.h
index 0d7180f0ebbc..b9b3ddeb4d39 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -22,7 +22,7 @@
 #define LOGLEVEL	MSG_VDEBUG
 #elif defined DEBUG
 #define LOGLEVEL	MSG_DEBUG
-#else
+#elif !defined(LOGLEVEL)
 #define LOGLEVEL	CONFIG_COMPILE_LOGLEVEL
 #endif
 
-- 
2.47.3




             reply	other threads:[~2026-02-05 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 17:11 Ahmad Fatoum [this message]
2026-02-09 14:26 ` Sascha Hauer

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=20260205171147.3096490-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=9l@9lo.re \
    --cc=barebox@lists.infradead.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