Re: [PATCH v2 1/2] vsprintf: Only export no_hash_pointers to test module
From: Thomas Weißschuh
Date: Mon May 04 2026 - 07:54:06 EST
On Mon, May 04, 2026 at 01:57:31PM +0300, Andy Shevchenko wrote:
> On Mon, May 04, 2026 at 12:43:40PM +0200, Thomas Weißschuh wrote:
> > Aside from the printf test module, no module should ever use this symbol.
>
> ...
>
> > -EXPORT_SYMBOL_GPL(no_hash_pointers);
>
> > +#if IS_MODULE(CONFIG_PRINTF_KUNIT_TEST)
> > +EXPORT_SYMBOL_FOR_MODULES(no_hash_pointers, "printf_kunit");
> > +#endif
>
> But do we need that ugly ifdeffery? the infrastructure should handle that.
Where does the generic infrastructure take the kconfig option into account?
> (Also, if I build a module separately after the kernel, it won't work.)
Only if it was not enabled when the kernel was built.
But if people are unhappy with the ifdeffery, I'm fine with dropping it.
It is not a hard requirement at all.
Thomas