From: Tony Lindgren <tony.lindgren@linux.intel.com>
To: Yu Liao <liaoyu15@huawei.com>
Cc: pmladek@suse.com, liwei391@huawei.com, rostedt@goodmis.org,
john.ogness@linutronix.de, senozhatsky@chromium.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] printk: Export match_devname_and_update_preferred_console()
Date: Mon, 9 Sep 2024 13:56:28 +0300 [thread overview]
Message-ID: <Zt7UXNZC1UR2t1OJ@tlindgre-MOBL1> (raw)
In-Reply-To: <Zt6xFlLyBgLhIlDU@tlindgre-MOBL1>
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
> >
next prev parent reply other threads:[~2024-09-09 10:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 7:56 Yu Liao
2024-09-09 8:25 ` Tony Lindgren
2024-09-09 10:56 ` Tony Lindgren [this message]
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
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=Zt7UXNZC1UR2t1OJ@tlindgre-MOBL1 \
--to=tony.lindgren@linux.intel.com \
--cc=john.ogness@linutronix.de \
--cc=liaoyu15@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.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
all inboxes | Powered by JetHome®