On 4/2/20 1:26 AM, Ricardo Cañuelo wrote: > >>> + #define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__ >> >> "fmt" should be last, not first, in order for modname and func to be >> prefixes. > > The way it's used in the pr_*() macros, this is the correct way to get the > prefixes right. > > Example: > > pr_emerg("message no. %d", num) > > expands to > > printk(KERN_EMERG pr_fmt("message no. %d", num) > > which expands to > > printk(KERN_EMERG "%s:%s: " "message no. %d", KBUILD_MODNAME, > __func__, num) I see. Thanks for explaining. -- ~Randy