[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0nnczp7.fsf@jogness.linutronix.de>
Date: Mon, 28 Aug 2023 11:02:36 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Zhu Yanjun <yanjun.zhu@...ux.dev>,
Li Zhijian <lizhijian@...itsu.com>, linux-rdma@...r.kernel.org,
"pmladek@...e.com" <pmladek@...e.com>,
"senozhatsky@...omium.org" <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>
Cc: zyjzyj2000@...il.com, jgg@...pe.ca, leon@...nel.org,
linux-kernel@...r.kernel.org, rpearsonhpe@...il.com,
Daisuke Matsuda <matsuda-daisuke@...itsu.com>
Subject: Re: [PATCH v2 1/2] RDMA/rxe: Improve newline in printing messages
Hi Zhu,
On 2023-08-23, Zhu Yanjun <yanjun.zhu@...ux.dev> wrote:
>> Previously rxe_{dbg,info,err}() macros are appened built-in newline,
>> sut some users will add redundent newline some times. So remove the
>> built-int newline for this macros.
>
> This commit is based on this statement "A newline help flushing
> message out.".
>
> All the rxe_xxx log functions will finally call printk.
>
> To pirntk, there is no such statement in kernel document. Not sure if
> Jason and Leon can decide this statement correct or not.
I also could not find any documentation explaining the semantics of
printk with regard to LOG_CONT and "\n". I suppose this should be added
somewhere.
However, the above statement is correct. You can see this in the code
[0]. All printk messages should have a trailing newline unless it is
only a partial message that will be appended.
John Ogness
[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/printk/printk.c?h=v6.5#n2254
Powered by blists - more mailing lists