Re: [PATCH] pcmcia: omap_cf: : Mark driver struct with __refdata to prevent section mismatch
From: Geert Uytterhoeven
Date: Wed Nov 06 2024 - 08:02:59 EST
On Wed, Nov 6, 2024 at 1:14 PM Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> wrote:
> As described in the added code comment, a reference to .exit.text is ok
> for drivers registered via platform_driver_probe(). Make this explicit
> to prevent the following section mismatch warning
>
> WARNING: modpost: drivers/pcmcia/omap_cf: section mismatch in reference: omap_cf_driver+0x4 (section: .data) -> omap_cf_remove (section: .exit.text)
>
> that triggers on an omap1_defconfig + CONFIG_OMAP_CF=m build.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
There is one more in the DaVinci cpufreq driver, but that one never
triggers a warning, as it cannot be a module.
So either davinci_cpufreq_remove() should be removed (it is never
emitted), or the __exit and __exit_p() should be dropped (then it can
be unbound manually, but never rebound).
https://elixir.bootlin.com/linux/v6.11.6/source/drivers/cpufreq/davinci-cpufreq.c#L134
Thoughts?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds