From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C081EC83F12 for ; Mon, 28 Aug 2023 08:57:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229532AbjH1I5K (ORCPT ); Mon, 28 Aug 2023 04:57:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjH1I4n (ORCPT ); Mon, 28 Aug 2023 04:56:43 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AED3BF; Mon, 28 Aug 2023 01:56:41 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1693212998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oQceVJwbfnJziP8tGTmnglMv0U/OynJlKuV/VxugPsI=; b=0lpq3q0YURZB4mOKnNPjl4+tDwTJJTA7GtobAxmkr2mrcqOVSOvp9kiBMNCqRWjKNbaVX1 iTkKMbcvNRO+Yt3Q3EjovbifZJakn5YCNClS597uSI8O8UYVLXRjyfOhbl81FKCLY88oVr a/Dr0+YYKLHxfI2amIecllE3njEeUBeA8MFeJfixecZm0aIJyc86o442d+5k0HLhhghkwI vHlcekNa6zR72kjk0SCjlyBNvzBVlTpKWsn4KIixmnmedVOq4pdGlOz7x2s9FdoRTU82Pv DSglUhyOGqwbYEygPMlgOLaMhN9dvFgZZiWgNlquBGlmQYZEYafecXnoegrvIw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1693212998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oQceVJwbfnJziP8tGTmnglMv0U/OynJlKuV/VxugPsI=; b=0kTO3nqmWcJUNtqCWg3XJAIxR2LytU5ZEUji5/w9qxDAe7j1rWFs4s2p6MdjrOCLn6IYvi Lxgmz0/jabU+F3Bg== To: Zhu Yanjun , Li Zhijian , linux-rdma@vger.kernel.org, "pmladek@suse.com" , "senozhatsky@chromium.org" , Steven Rostedt Cc: zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org, linux-kernel@vger.kernel.org, rpearsonhpe@gmail.com, Daisuke Matsuda Subject: Re: [PATCH v2 1/2] RDMA/rxe: Improve newline in printing messages In-Reply-To: References: <20230823061141.258864-1-lizhijian@fujitsu.com> Date: Mon, 28 Aug 2023 11:02:36 +0206 Message-ID: <87r0nnczp7.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zhu, On 2023-08-23, Zhu Yanjun 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