From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752113AbdK0G5S (ORCPT ); Mon, 27 Nov 2017 01:57:18 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:5994 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648AbdK0G5R (ORCPT ); Mon, 27 Nov 2017 01:57:17 -0500 X-IronPort-AV: E=Sophos;i="5.44,463,1505772000"; d="scan'208";a="246066802" Date: Mon, 27 Nov 2017 07:57:15 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Logan Gunthorpe cc: Joe Perches , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Andy Whitcroft Subject: Re: [PATCH v2] checkpatch: Add a warning for log messages that don't end in a new line In-Reply-To: <214bd4fd-7074-8af7-2993-a11b2605346f@deltatee.com> Message-ID: References: <20171126054037.9743-1-logang@deltatee.com> <85bdbab8-8b7e-91a9-7199-a0e39041aef1@deltatee.com> <3fc88c02-b9b6-80a3-0c41-63e0806d34aa@deltatee.com> <1511746526.20482.38.camel@perches.com> <214bd4fd-7074-8af7-2993-a11b2605346f@deltatee.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 26 Nov 2017, Logan Gunthorpe wrote: > > > On 26/11/17 11:42 PM, Julia Lawall wrote: > > Although I guess that in that case the whole exercise is pointless? > > Because every print will at runtime be followed by another print, which > > will add either the newline or a continuation. > > Yes, in practice the '\n' at the end of every log line is optional based > on what the code actually does. Nothing bad happens if you omit one. But > reviewers still point out that they are required. (That's what started > me on this mess -- because I'd rather know what the correct thing is > before I commit the code for the first time, and not months after the > code reached mainline.) > > The reviewers have a really good point though: if a significant fraction > of the log calls have no new line and a majority have them, then making > any kind of change in this area could break things. Not to mention the > ugliness of the inconsistencies everywhere. Also, the more cases that > are "wrong" that get into the kernel the more it confuses people trying > to learn what the "right" thing is. The problem is probably mostly for the non-standard functions, where a lot of function/macro unfolding is often required to see what is really going on. julia > > Honestly, though, I have no dog in this race. I just thought it would be > useful. > > Logan > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Date: Mon, 27 Nov 2017 06:57:15 +0000 Subject: Re: [PATCH v2] checkpatch: Add a warning for log messages that don't end in a new line Message-Id: List-Id: References: <20171126054037.9743-1-logang@deltatee.com> <85bdbab8-8b7e-91a9-7199-a0e39041aef1@deltatee.com> <3fc88c02-b9b6-80a3-0c41-63e0806d34aa@deltatee.com> <1511746526.20482.38.camel@perches.com> <214bd4fd-7074-8af7-2993-a11b2605346f@deltatee.com> In-Reply-To: <214bd4fd-7074-8af7-2993-a11b2605346f@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Logan Gunthorpe Cc: Joe Perches , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Andy Whitcroft On Sun, 26 Nov 2017, Logan Gunthorpe wrote: > > > On 26/11/17 11:42 PM, Julia Lawall wrote: > > Although I guess that in that case the whole exercise is pointless? > > Because every print will at runtime be followed by another print, which > > will add either the newline or a continuation. > > Yes, in practice the '\n' at the end of every log line is optional based > on what the code actually does. Nothing bad happens if you omit one. But > reviewers still point out that they are required. (That's what started > me on this mess -- because I'd rather know what the correct thing is > before I commit the code for the first time, and not months after the > code reached mainline.) > > The reviewers have a really good point though: if a significant fraction > of the log calls have no new line and a majority have them, then making > any kind of change in this area could break things. Not to mention the > ugliness of the inconsistencies everywhere. Also, the more cases that > are "wrong" that get into the kernel the more it confuses people trying > to learn what the "right" thing is. The problem is probably mostly for the non-standard functions, where a lot of function/macro unfolding is often required to see what is really going on. julia > > Honestly, though, I have no dog in this race. I just thought it would be > useful. > > Logan > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >