Re: [RFC 1/2] printk/dynamic_debug: Remove cyclic dependency between printk.h and dynamic_debug.h

From: jim . cromie
Date: Mon Jan 17 2022 - 17:40:01 EST


On Thu, Jan 13, 2022 at 1:35 AM Petr Mladek <pmladek@xxxxxxxx> wrote:
>
> On Wed 2022-01-12 20:38:57, jim.cromie@xxxxxxxxx wrote:
> > On Wed, Jan 12, 2022 at 5:12 AM Petr Mladek <pmladek@xxxxxxxx> wrote:
> > >
> > > On Tue 2022-01-11 17:01:35, Rasmus Villemoes wrote:
> > > > On 11/01/2022 15.30, Petr Mladek wrote:
> >
> >
> > > > > static inline int dynamic_debug_exec_queries(const char *query, const char *modname)
> > > > > {
> > > > > - pr_warn("kernel not built with CONFIG_DYNAMIC_DEBUG_CORE\n");
> > > > > + /* Use raw _printk() to avoid cyclic dependency. */
> > > > > + _printk(KERN_WARNING "kernel not built with CONFIG_DYNAMIC_DEBUG_CORE\n");
> > > > > return 0;
> > > > > }
> > > >
> > > > And for this one I think the solution is even simpler, as I can't find
> > > > any in-tree callers. Perhaps just nuke it entirely?
> > >
> > > Adding Jim into Cc whether he still has any plans to use this API.
> > >
> > > Best Regards,
> > > Petr
> >
> > This EXPORT can go.
>
> Does it mean that the entire function might be removed or just
> EXPORT_SYMBOL_GPL() macro, please?
>

the whole function and export can be dropped.
its a thin wrapper on static ddebug_exec_queries().

And apologies, I thought Id sent this earlier.

> I am especially interested whether we could remove pr_warn()
> from the header file. It would help us the get rid of the
> cyclic header dependency an easy way.
>
> Best Regards,
> Petr