Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755519AbcC3QXG (ORCPT ); Wed, 30 Mar 2016 12:23:06 -0400 Received: from smtprelay0130.hostedemail.com ([216.40.44.130]:46991 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754333AbcC3QWX (ORCPT ); Wed, 30 Mar 2016 12:22:23 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2828:2895:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:5007:7807:7808:8603:10004:10400:10848:11026:11232:11658:11783:11914:12043:12262:12296:12438:12517:12519:12555:12663:12679:12740:13019:13132:13231:13439:13894:14181:14659:14721:21063:21080:21220:21365:30012:30030:30054:30064:30069:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: turn03_88e41a217e13b X-Filterd-Recvd-Size: 3294 Message-ID: <1459354939.25110.123.camel@perches.com> Subject: Re: [PATCH 0/3] jfs: logging neatening From: Joe Perches To: Dave Kleikamp , JFS Discussion Cc: linux-kernel@vger.kernel.org Date: Wed, 30 Mar 2016 09:22:19 -0700 In-Reply-To: <56FBF747.60306@oracle.com> References: <56FBF747.60306@oracle.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2421 Lines: 62 On Wed, 2016-03-30 at 10:56 -0500, Dave Kleikamp wrote: > On 03/30/2016 07:23 AM, Joe Perches wrote: > > > > This patchset fixes the uses of jfs_info, jfs_warn and jfs_err that > > have terminating newlines and a couple other trivialities to make > > the logging a bit more consistent. > These patches look good. I'm pushing them out to the -next build. > > > > > There is a difference in use between jfs_error and the other > > jfs_info, jfs_warn, and jfs_err logging macros.??jfs_error is more > > like the rest of the kernel and requires a newline as the last > > character of the format. > > > > The jfs_info, jfs_warn, and jfs_err macros add the terminating > > newline to the format so the uses do not require them. > I think there's an argument for both ways of doing it. I'm sure I had my > reasons for automatically adding the newline back when I implemented > those macros. (They probably should be inline functions, but that's > another issue.) Nah. ?It was me. ?I changed jfs_error awhile back to move the newline to the uses. commit eb8630d7d2fd13589e6a7a3ae2fe1f75f867fbed Author: Joe Perches Date:???Tue Jun 4 16:39:15 2013 -0700 ????jfs: Update jfs_error ???? ????Use a more current logging style. ???? ????Add __printf format and argument verification. ???? ????Remove embedded function names from formats. ????Add %pf, __builtin_return_address(0) to jfs_error. ????Add newlines to formats for kernel style consistency. ????(One format already had an erroneous newline) ????Coalesce formats and align arguments. ???? ????Object size reduced ~1KiB. ???? ????$ size fs/jfs/built-in.o* ???????text????????data?????bss?????dec?????hex filename ?????201891???????35488???63936??301315???49903 fs/jfs/built-in.o.new ?????202821???????35488???64192??302501???49da5 fs/jfs/built-in.o.old Using inline functions would actually be more code as you'd have to handle the log level and newline via a vprintk of some type. ?At least the test could be consolidated into the inline though. Many of the jfs_info calls appear to be function tracing and perhaps could be eliminated altogether. > It might be better if the jfs_info, jfs_warn, and jfs_err macros > > were changed to require a newline termination and the uses changed > > to include the newline, but that's a larger change. > Yeah, these patches are the obvious improvement, without changing > anything from a design standpoint.