Re: [PATCH printk v1 10/18] printk: nobkl: Add emit function and callback functions for atomic printing

From: John Ogness
Date: Fri Mar 03 2023 - 05:56:57 EST


On 2023-03-03, kernel test robot <lkp@xxxxxxxxx> wrote:
>>> kernel/printk/printk.c:2841:6: warning: no previous prototype for 'printk_get_next_message' [-Wmissing-prototypes]
> 2841 | bool printk_get_next_message(struct printk_message *pmsg, u64 seq,
> | ^~~~~~~~~~~~~~~~~~~~~~~

This function needs to be declared for !CONFIG_PRINTK as well.

diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
index 8856beed65da..60d6bf18247e 100644
--- a/kernel/printk/internal.h
+++ b/kernel/printk/internal.h
@@ -188,10 +188,11 @@ struct cons_context_data {
struct printk_buffers pbufs;
};

-#ifdef CONFIG_PRINTK
-
bool printk_get_next_message(struct printk_message *pmsg, u64 seq,
bool is_extended, bool may_supress);
+
+#ifdef CONFIG_PRINTK
+
void console_prepend_dropped(struct printk_message *pmsg,
unsigned long dropped);