CONSOLE_LOGLEVEL_MIN is only used in kernel/printk/printk.c.

You do not need to expose it to all printk() users.

I could move it to kernel/printk/printk.c, but I do not think this
macro would contribute to the code readability or maintainability.

I just hard-coded it.

Signed-off-by: Masahiro Yamada <masahi...@kernel.org>
---

 include/linux/printk.h | 1 -
 kernel/printk/printk.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/printk.h b/include/linux/printk.h
index fd34b3aa2f90..ceaf0486c01c 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -48,7 +48,6 @@ static inline const char *printk_skip_headers(const char 
*buffer)
 
 /* We show everything that is MORE important than this.. */
 #define CONSOLE_LOGLEVEL_SILENT  0 /* Mum's the word */
-#define CONSOLE_LOGLEVEL_MIN    1 /* Minimum loglevel we let people use */
 #define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */
 #define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */
 
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 92b93340905c..7b50298d52e3 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -63,7 +63,7 @@
 int console_printk[4] = {
        CONFIG_CONSOLE_LOGLEVEL_DEFAULT,        /* console_loglevel */
        CONFIG_MESSAGE_LOGLEVEL_DEFAULT,        /* default_message_loglevel */
-       CONSOLE_LOGLEVEL_MIN,           /* minimum_console_loglevel */
+       1,                                      /* minimum_console_loglevel */
        CONFIG_CONSOLE_LOGLEVEL_DEFAULT,        /* default_console_loglevel */
 };
 EXPORT_SYMBOL_GPL(console_printk);
-- 
2.27.0

Reply via email to