* [PATCH -next] printk: Export match_devname_and_update_preferred_console()
@ 2024-09-09 7:56 Yu Liao
2024-09-09 8:25 ` Tony Lindgren
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Yu Liao @ 2024-09-09 7:56 UTC (permalink / raw)
To: pmladek, tony.lindgren
Cc: liaoyu15, liwei391, rostedt, john.ogness, senozhatsky,
linux-kernel
When building serial_base as a module, modpost fails with the following
error message:
ERROR: modpost: "match_devname_and_update_preferred_console"
[drivers/tty/serial/serial_base.ko] undefined!
Export the symbol to allow using it from modules.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409071312.qlwtTOS1-lkp@intel.com/
Fixes: 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()")
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
---
kernel/printk/printk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index c22b07049c38..6ff8d47e145f 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2620,6 +2620,7 @@ int match_devname_and_update_preferred_console(const char *devname,
return -ENOENT;
}
+EXPORT_SYMBOL_GPL(match_devname_and_update_preferred_console);
bool console_suspend_enabled = true;
EXPORT_SYMBOL(console_suspend_enabled);
--
2.33.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH -next] printk: Export match_devname_and_update_preferred_console() 2024-09-09 7:56 [PATCH -next] printk: Export match_devname_and_update_preferred_console() Yu Liao @ 2024-09-09 8:25 ` Tony Lindgren 2024-09-09 10:56 ` Tony Lindgren 2024-09-09 16:06 ` Petr Mladek 2024-09-09 17:27 ` [tip: sched/rt] " tip-bot2 for Yu Liao 2 siblings, 1 reply; 7+ messages in thread From: Tony Lindgren @ 2024-09-09 8:25 UTC (permalink / raw) To: Yu Liao; +Cc: pmladek, liwei391, rostedt, john.ogness, senozhatsky, linux-kernel On Mon, Sep 09, 2024 at 03:56:52PM +0800, Yu Liao wrote: > When building serial_base as a module, modpost fails with the following > error message: > > ERROR: modpost: "match_devname_and_update_preferred_console" > [drivers/tty/serial/serial_base.ko] undefined! > > Export the symbol to allow using it from modules. I think the issue is with CONFIG_PRINTK is no set, and serial drivers select SERIAL_CORE_CONSOLE? And when serial_base is a module, there is no kernel console. I replied earlier today to the lkp error report along those lines, but please let me know if there is more to the issue than that. Regards, Tony > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202409071312.qlwtTOS1-lkp@intel.com/ > Fixes: 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()") > Signed-off-by: Yu Liao <liaoyu15@huawei.com> > --- > kernel/printk/printk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index c22b07049c38..6ff8d47e145f 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2620,6 +2620,7 @@ int match_devname_and_update_preferred_console(const char *devname, > > return -ENOENT; > } > +EXPORT_SYMBOL_GPL(match_devname_and_update_preferred_console); > > bool console_suspend_enabled = true; > EXPORT_SYMBOL(console_suspend_enabled); > -- > 2.33.0 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] printk: Export match_devname_and_update_preferred_console() 2024-09-09 8:25 ` Tony Lindgren @ 2024-09-09 10:56 ` Tony Lindgren 2024-09-10 6:41 ` Petr Mladek 0 siblings, 1 reply; 7+ messages in thread From: Tony Lindgren @ 2024-09-09 10:56 UTC (permalink / raw) To: Yu Liao; +Cc: pmladek, liwei391, rostedt, john.ogness, senozhatsky, linux-kernel On Mon, Sep 09, 2024 at 11:25:58AM +0300, Tony Lindgren wrote: > On Mon, Sep 09, 2024 at 03:56:52PM +0800, Yu Liao wrote: > > When building serial_base as a module, modpost fails with the following > > error message: > > > > ERROR: modpost: "match_devname_and_update_preferred_console" > > [drivers/tty/serial/serial_base.ko] undefined! > > > > Export the symbol to allow using it from modules. > > I think the issue is with CONFIG_PRINTK is no set, and serial drivers > select SERIAL_CORE_CONSOLE? And when serial_base is a module, there is > no kernel console. > > I replied earlier today to the lkp error report along those lines, but > please let me know if there is more to the issue than that. Sorry I gave wrong information above. The issue can be hit also with CONFIG_PRINTK=y and serial_base as a loadable module. Regards, Tony > > Reported-by: kernel test robot <lkp@intel.com> > > Closes: https://lore.kernel.org/oe-kbuild-all/202409071312.qlwtTOS1-lkp@intel.com/ > > Fixes: 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()") > > Signed-off-by: Yu Liao <liaoyu15@huawei.com> > > --- > > kernel/printk/printk.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > > index c22b07049c38..6ff8d47e145f 100644 > > --- a/kernel/printk/printk.c > > +++ b/kernel/printk/printk.c > > @@ -2620,6 +2620,7 @@ int match_devname_and_update_preferred_console(const char *devname, > > > > return -ENOENT; > > } > > +EXPORT_SYMBOL_GPL(match_devname_and_update_preferred_console); > > > > bool console_suspend_enabled = true; > > EXPORT_SYMBOL(console_suspend_enabled); > > -- > > 2.33.0 > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] printk: Export match_devname_and_update_preferred_console() 2024-09-09 10:56 ` Tony Lindgren @ 2024-09-10 6:41 ` Petr Mladek 2024-09-10 7:10 ` Tony Lindgren 0 siblings, 1 reply; 7+ messages in thread From: Petr Mladek @ 2024-09-10 6:41 UTC (permalink / raw) To: Tony Lindgren Cc: Yu Liao, liwei391, rostedt, john.ogness, senozhatsky, linux-kernel On Mon 2024-09-09 13:56:28, Tony Lindgren wrote: > On Mon, Sep 09, 2024 at 11:25:58AM +0300, Tony Lindgren wrote: > > On Mon, Sep 09, 2024 at 03:56:52PM +0800, Yu Liao wrote: > > > When building serial_base as a module, modpost fails with the following > > > error message: > > > > > > ERROR: modpost: "match_devname_and_update_preferred_console" > > > [drivers/tty/serial/serial_base.ko] undefined! > > > > > > Export the symbol to allow using it from modules. > > > > I think the issue is with CONFIG_PRINTK is no set, and serial drivers > > select SERIAL_CORE_CONSOLE? And when serial_base is a module, there is > > no kernel console. > > > > I replied earlier today to the lkp error report along those lines, but > > please let me know if there is more to the issue than that. > > Sorry I gave wrong information above. The issue can be hit also with > CONFIG_PRINTK=y and serial_base as a loadable module. Yes, this is my understanding. The problem has happened when serial_base was built as a module. So exporting the symbol looks like the right fix. Best Regards, Petr ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] printk: Export match_devname_and_update_preferred_console() 2024-09-10 6:41 ` Petr Mladek @ 2024-09-10 7:10 ` Tony Lindgren 0 siblings, 0 replies; 7+ messages in thread From: Tony Lindgren @ 2024-09-10 7:10 UTC (permalink / raw) To: Petr Mladek Cc: Yu Liao, liwei391, rostedt, john.ogness, senozhatsky, linux-kernel On Tue, Sep 10, 2024 at 08:41:38AM +0200, Petr Mladek wrote: > On Mon 2024-09-09 13:56:28, Tony Lindgren wrote: > > On Mon, Sep 09, 2024 at 11:25:58AM +0300, Tony Lindgren wrote: > > > On Mon, Sep 09, 2024 at 03:56:52PM +0800, Yu Liao wrote: > > > > When building serial_base as a module, modpost fails with the following > > > > error message: > > > > > > > > ERROR: modpost: "match_devname_and_update_preferred_console" > > > > [drivers/tty/serial/serial_base.ko] undefined! > > > > > > > > Export the symbol to allow using it from modules. > > > > > > I think the issue is with CONFIG_PRINTK is no set, and serial drivers > > > select SERIAL_CORE_CONSOLE? And when serial_base is a module, there is > > > no kernel console. > > > > > > I replied earlier today to the lkp error report along those lines, but > > > please let me know if there is more to the issue than that. > > > > Sorry I gave wrong information above. The issue can be hit also with > > CONFIG_PRINTK=y and serial_base as a loadable module. > > Yes, this is my understanding. The problem has happened when serial_base > was built as a module. So exporting the symbol looks like the right fix. Yes agreed. And, Yu, thanks for fixing the issue! Regards, Tony ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] printk: Export match_devname_and_update_preferred_console() 2024-09-09 7:56 [PATCH -next] printk: Export match_devname_and_update_preferred_console() Yu Liao 2024-09-09 8:25 ` Tony Lindgren @ 2024-09-09 16:06 ` Petr Mladek 2024-09-09 17:27 ` [tip: sched/rt] " tip-bot2 for Yu Liao 2 siblings, 0 replies; 7+ messages in thread From: Petr Mladek @ 2024-09-09 16:06 UTC (permalink / raw) To: Yu Liao Cc: tony.lindgren, liwei391, rostedt, john.ogness, senozhatsky, linux-kernel On Mon 2024-09-09 15:56:52, Yu Liao wrote: > When building serial_base as a module, modpost fails with the following > error message: > > ERROR: modpost: "match_devname_and_update_preferred_console" > [drivers/tty/serial/serial_base.ko] undefined! > > Export the symbol to allow using it from modules. > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202409071312.qlwtTOS1-lkp@intel.com/ > Fixes: 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()") > Signed-off-by: Yu Liao <liaoyu15@huawei.com> It looks good. I have pushed the fix into printk/linux.git, branch for-6.11-fixup. I am going to send a pull request later this week. Best Regards, Petr ^ permalink raw reply [flat|nested] 7+ messages in thread
* [tip: sched/rt] printk: Export match_devname_and_update_preferred_console() 2024-09-09 7:56 [PATCH -next] printk: Export match_devname_and_update_preferred_console() Yu Liao 2024-09-09 8:25 ` Tony Lindgren 2024-09-09 16:06 ` Petr Mladek @ 2024-09-09 17:27 ` tip-bot2 for Yu Liao 2 siblings, 0 replies; 7+ messages in thread From: tip-bot2 for Yu Liao @ 2024-09-09 17:27 UTC (permalink / raw) To: linux-tip-commits Cc: kernel test robot, Yu Liao, Petr Mladek, x86, linux-kernel The following commit has been merged into the sched/rt branch of tip: Commit-ID: 3e5b2e81f17f176a4d451c1dd1794e64644319c4 Gitweb: https://git.kernel.org/tip/3e5b2e81f17f176a4d451c1dd1794e64644319c4 Author: Yu Liao <liaoyu15@huawei.com> AuthorDate: Mon, 09 Sep 2024 15:56:52 +08:00 Committer: Petr Mladek <pmladek@suse.com> CommitterDate: Mon, 09 Sep 2024 17:35:06 +02:00 printk: Export match_devname_and_update_preferred_console() When building serial_base as a module, modpost fails with the following error message: ERROR: modpost: "match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined! Export the symbol to allow using it from modules. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409071312.qlwtTOS1-lkp@intel.com/ Fixes: 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()") Signed-off-by: Yu Liao <liaoyu15@huawei.com> Link: https://lore.kernel.org/r/20240909075652.747370-1-liaoyu15@huawei.com Signed-off-by: Petr Mladek <pmladek@suse.com> --- kernel/printk/printk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index c22b070..6ff8d47 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2620,6 +2620,7 @@ int match_devname_and_update_preferred_console(const char *devname, return -ENOENT; } +EXPORT_SYMBOL_GPL(match_devname_and_update_preferred_console); bool console_suspend_enabled = true; EXPORT_SYMBOL(console_suspend_enabled); ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-09-10 7:10 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-09-09 7:56 [PATCH -next] printk: Export match_devname_and_update_preferred_console() Yu Liao 2024-09-09 8:25 ` Tony Lindgren 2024-09-09 10:56 ` Tony Lindgren 2024-09-10 6:41 ` Petr Mladek 2024-09-10 7:10 ` Tony Lindgren 2024-09-09 16:06 ` Petr Mladek 2024-09-09 17:27 ` [tip: sched/rt] " tip-bot2 for Yu Liao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox