lkml.org 
[lkml]   [2018]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: Add caller information to printk() output.
On Tue 2018-12-18 17:55:24, Sergey Senozhatsky wrote:
> On (12/18/18 06:05), Tetsuo Handa wrote:
> > +#ifdef CONFIG_PRINTK_CALLER
> > +static size_t print_caller(u32 id, char *buf)
> > +{
> > + char from[12];
> > +
> > + snprintf(from, sizeof(from), "%c%u",
> > + id & 0x80000000 ? 'C' : 'T', id & ~0x80000000);
> > + return sprintf(buf, "[%6s]", from);
> > +}
>
> A nitpick:
>
> s/from/caller/g :)

Great catch!

>
> > + Selecting this option causes "thread id" (if in task context) or
> > + "processor id" (if not in task context) of the printk() messages
> > + to be added.
>
> Would the following wording be a bit simpler?
>
> "Selecting this option causes printk() to add a caller "thread id" (if
> in task context) or a caller "processor id" (if not in task context)
> to every message."

It sounds good to me.

I have updated the patch in printk.git, for-4.22 branch.

Best Regards,
Petr

PS: I think that I have rushed the patch probably too much.
I did too much nitpicking in the past and am trying to find
a better balance now.

\
 
 \ /
  Last update: 2018-12-18 11:02    [W:0.241 / U:25.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site