Hello Danish, On Sat, Sep 26, 2026 at 11:35:06AM -0500, Danish Khateeb wrote: > 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) Isn't that a false positive because with CONFIG_MODULES=n .exit is discarded and so the section mismatch doesn't matter? > The exit code never runs in such a kernel, so nothing breaks at runtime. Ah, you found that, too. > But a function that is called from both __init and __exit code can't > carry either annotation, so drop it. I thought __init_or_module was the right annotation ... Best regards Uwe