From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750798AbdDAE2B (ORCPT ); Sat, 1 Apr 2017 00:28:01 -0400 Received: from smtprelay0088.hostedemail.com ([216.40.44.88]:46410 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750726AbdDAE2A (ORCPT ); Sat, 1 Apr 2017 00:28:00 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:967:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2525:2553:2561:2564:2682:2685:2828:2859:2898:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:5007:7875:7903:7974:8985:9025:10004:10400:10848:11232:11658:11914:12043:12663:12679:12740:12760:12895:13069:13153:13161:13228:13229:13311:13357:13439:14096:14097:14181:14659:14721:21080:21433:30029:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: price07_7ef516c274123 X-Filterd-Recvd-Size: 2933 Message-ID: <1491020871.27353.37.camel@perches.com> Subject: Re: [PATCH 001/001] drivers/staging/vt6656/main_usb.c: checkpatch warning From: Joe Perches To: Al Viro Cc: Chewie Lin , greg@kroah.com, forest@alittletooquiet.net, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Fri, 31 Mar 2017 21:27:51 -0700 In-Reply-To: <20170401040842.GF29622@ZenIV.linux.org.uk> References: <20170401015919.9181-1-linsh@oregonstate.edu> <20170401015919.9181-2-linsh@oregonstate.edu> <20170401033239.GD29622@ZenIV.linux.org.uk> <1491017782.27353.33.camel@perches.com> <20170401034623.GE29622@ZenIV.linux.org.uk> <1491018770.27353.35.camel@perches.com> <20170401040842.GF29622@ZenIV.linux.org.uk> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2017-04-01 at 05:08 +0100, Al Viro wrote: > On Fri, Mar 31, 2017 at 08:52:50PM -0700, Joe Perches wrote: > > > > MILD SUGGESTION: don't spell the function name out in format strings; > > > "this_function: foo is %d", n > > > might be better off as > > > "%s: foo is %d", __func__, n > > > in case you ever move it to another function or rename your function. > > > > Thank you sir, may I have another. > > > > checkpatch messages are single line. > > Too bad... Incidentally, being able to get more detailed explanation of > a warning might be a serious improvement, especially if it contains > the rationale. Hell, something like TeX handling of errors might be > a good idea - warning printed, offered actions include 'give more help', > 'continue', 'exit', 'from now on suppress this kind of warning', 'from > now on just dump this kind of warning into log and keep going', 'from > now on dump all warnings into log and keep going'. Well, there is the possibility to have longer messages. It's just the --terse option has to be somewhat sensible. > And yes, I'm serious about having something like "mild suggestion" as > possible severity - people are using that thing to look for potential > improvements to make and 'such and such change might be useful for such > and such reasons' is a lot more useful than 'this needs to be thus because > it must be thus or I'll keep warning'. I agree about checkpatch and ERROR/WARNING/CHECK vs some other wording. https://lkml.org/lkml/2016/8/27/180 https://lkml.org/lkml/2015/7/16/568 The other thing that might help is for people to take the warnings the script produces less seriously. Maybe convert: ERROR -> defect WARNING -> unstylish CHECK -> nitpick or some such.