diff options
| author | Danish Khateeb <danishkhateeb03@gmail.com> | 2026-09-26 11:35:06 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-10-01 11:11:04 +0200 |
| commit | c44a4925cdac02af781ebfae96df68a7bf3580b0 (patch) | |
| tree | cc1bb4bba64870ab7f23a0557328f55624f00f59 /include | |
| parent | b290393074a149ed2f45da6759c94719c06b48c4 (diff) | |
| download | linux-next-c44a4925cdac02af781ebfae96df68a7bf3580b0.tar.gz linux-next-c44a4925cdac02af781ebfae96df68a7bf3580b0.zip | |
serial: 8250: Fix section mismatch with CONFIG_MODULES=n
Without CONFIG_MODULES, __init_or_module means __init, so
serial8250_pnp_exit() and serial8250_hub6_exit() end up in .init.text.
They are also called from serial8250_exit(), which is __exit, and
modpost warns:
WARNING: modpost: vmlinux: section mismatch in reference: serial8250_exit+0x2a (section: .exit.text) -> serial8250_pnp_exit (section: .init.text)
The exit code never runs in such a kernel, so nothing breaks at runtime.
But a function that is called from both __init and __exit code can't
carry either annotation, so drop it.
Fixes: a300273c458c ("serial: 8250: hub6: Add cleanup code")
Fixes: 4cf187f9dea9 ("serial: 8250: pnp: Annotate init and exit functions for conditional discarding")
Assisted-by: LLM
Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com>
Link: https://patch.msgid.link/20260926163506.487201-1-danishkhateeb03@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
