Re: [PATCH v2 1/2] vsprintf: Only export no_hash_pointers to test module

From: Andy Shevchenko

Date: Mon May 04 2026 - 10:13:10 EST


On Mon, May 04, 2026 at 01:53:47PM +0200, Thomas Weißschuh wrote:
> 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:

...

> > > -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?

Nowhere, but my point that it's taken care of at run-time.

> > (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.

I think it's unnecessary to have. But I'm not a maintainer of this code.

--
With Best Regards,
Andy Shevchenko