From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH] serial: 8250: export RSA functions
Date: Mon, 23 Jun 2025 08:10:35 +0200 [thread overview]
Message-ID: <20250623061035.436414-1-jirislaby@kernel.org> (raw)
The RSA functions moved by the below commit to 8250_rsa.c are used in
8250_base.c. Since that can be a module (when CONFIG_SERIAL_8250=m),
this causes build failures:
ERROR: modpost: "rsa_autoconfig" [drivers/tty/serial/8250/8250_base.ko] undefined!
ERROR: modpost: "rsa_reset" [drivers/tty/serial/8250/8250_base.ko] undefined!
ERROR: modpost: "rsa_disable" [drivers/tty/serial/8250/8250_base.ko] undefined!
ERROR: modpost: "rsa_enable" [drivers/tty/serial/8250/8250_base.ko] undefined!
Fix them by exporting the functions. But only to the base module using
EXPORT_SYMBOL_GPL_FOR_MODULES(). (And not to the whole world.)
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/all/20250619165607.33403e19@canb.auug.org.au/
Fixes: 5a128fb475fb ("serial: 8250: move RSA functions to 8250_rsa.c")
---
drivers/tty/serial/8250/8250_rsa.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_rsa.c b/drivers/tty/serial/8250/8250_rsa.c
index 2f1ee693103d..ff52ad02f6be 100644
--- a/drivers/tty/serial/8250/8250_rsa.c
+++ b/drivers/tty/serial/8250/8250_rsa.c
@@ -146,6 +146,7 @@ void rsa_enable(struct uart_8250_port *up)
if (up->port.uartclk == SERIAL_RSA_BAUD_BASE * 16)
serial_out(up, UART_RSA_FRR, 0);
}
+EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_enable, "8250_base");
/*
* Attempts to turn off the RSA FIFO and resets the RSA board back to 115kbps compat mode. It is
@@ -177,6 +178,7 @@ void rsa_disable(struct uart_8250_port *up)
if (result)
up->port.uartclk = SERIAL_RSA_BAUD_BASE_LO * 16;
}
+EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_disable, "8250_base");
void rsa_autoconfig(struct uart_8250_port *up)
{
@@ -189,6 +191,7 @@ void rsa_autoconfig(struct uart_8250_port *up)
if (__rsa_enable(up))
up->port.type = PORT_RSA;
}
+EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_autoconfig, "8250_base");
void rsa_reset(struct uart_8250_port *up)
{
@@ -197,6 +200,7 @@ void rsa_reset(struct uart_8250_port *up)
serial_out(up, UART_RSA_FRR, 0);
}
+EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_reset, "8250_base");
#ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS
#ifndef MODULE
--
2.49.0
reply other threads:[~2025-06-23 6:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250623061035.436414-1-jirislaby@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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®