lkml.org 
[lkml]   [2018]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: inject caller information into the body of message
On (09/13/18 21:12), Steven Rostedt wrote:
> >
> > +#define __SEQ_BUF_INITIALIZER(buf, length) { \
> > + .buffer = (buf), \
> > + .size = (length), \
> > + .len = 0, \
> > + .readpos = 0, }
>
> Nit, but the end bracket '}' should be on it's own line. Even when
> part of a macro.

No prob, will change.

I thought about putting it on its own line, but then checked
include/linux/wait.h - __WAITQUEUE_INITIALIZER and
__WAIT_QUEUE_HEAD_INITIALIZER.

> > +#define DEFINE_PR_LINE(lev, name) \
> > + char __line[__PR_LINE_BUF_SZ]; \
>
> To protect against name space collision could you use:
>
> char __line_##name[__PR_LINE_BUF_SZ];

Yes.

> The rest looks fine to me.
>
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Thanks.

Just, to make sure, we are OK with seq_buf dependency and want
anyone who wants to use pr_line to include linux/seq_buf.h?

-ss

\
 
 \ /
  Last update: 2018-09-14 03:56    [W:0.133 / U:10.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site