Re: dyndbg: pr_fmt(fmt) with additional arguments?
From: Philipp Hahn
Date: Tue Mar 17 2026 - 16:42:25 EST
Hello Jim,
Am Sun, Mar 15, 2026 at 05:30:43PM -0600 schrieb jim.cromie@xxxxxxxxx:
> On Fri, Feb 27, 2026 at 4:12 AM Philipp Hahn <phahn-oss@xxxxxx> wrote:
> >
> > Hello Jason, hello Jim,
> >
> > I've been using the following in my modules to prefix all messages with
> > the module and function name:
> > #define pr_fmt(fmt) KBUILD_MODNAME ".%s ", __func__
>
> Your example loses the fmt, so is not actually useful.
Yes, somehow that 'fmt' got lost; I've re-added it.
> but that said, the compile err is real, I hit it once I changed
>
> 1 - the pr_debug("exited") call in test_dynamic_debug.c
> to pr_debug_ratelimited.
>
> 2- the pr_fmt in same:
> #if defined(TEST_DYNAMIC_DEBUG_SUBMOD)
> - #define pr_fmt(fmt) "test_dd_submod: " fmt
> + #define pr_fmt(fmt) KBUILD_MODNAME " test_dd_submod: %s" fmt, __func__
>
> 2 was my test-case, on my latest branch, yours (on master) will be different.
>
> please add that test to your patch, and my
> Acked-by: Jim Cromie <jim.cromie@xxxxxxxxx>
I did both; v2 is on it's way. Thank you for your review.
Philipp Hahn