Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757728AbbEWASL (ORCPT ); Fri, 22 May 2015 20:18:11 -0400 Received: from smtprelay0103.hostedemail.com ([216.40.44.103]:37370 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757250AbbEWASJ (ORCPT ); Fri, 22 May 2015 20:18:09 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2692:2828:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:5007:6261:7550:7903:9036:10004:10400:10450:10455:10848:11026:11232:11658:11914:12296:12517:12519:12740:13019:13095:19904:19999:21080,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 X-HE-Tag: vest24_29b89ca8c862e X-Filterd-Recvd-Size: 4338 Message-ID: <1432340285.29657.26.camel@perches.com> Subject: Re: [PATCH v4 10/13] staging: lustre: lnet: lnet: checkpatch.pl fixes From: Joe Perches To: "Drokin, Oleg" Cc: Julia Lawall , Michael Shuey , "" , "" , "" , "" , "" , "" Date: Fri, 22 May 2015 17:18:05 -0700 In-Reply-To: <863F0D66-99B1-4658-8A99-E3A843E0E8FC@intel.com> References: <1432237849-53947-1-git-send-email-shuey@purdue.edu> <1432237849-53947-11-git-send-email-shuey@purdue.edu> <1432242004.20840.68.camel@perches.com> <15C0AFDB-CA69-40E5-B65E-C559A5B5CE47@intel.com> <1432309337.29657.16.camel@perches.com> <05DE4AF3-20A6-40F6-BAC6-79C140E490AF@intel.com> <1432339030.29657.20.camel@perches.com> <863F0D66-99B1-4658-8A99-E3A843E0E8FC@intel.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 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 Content-Length: 2788 Lines: 64 On Sat, 2015-05-23 at 00:07 +0000, Drokin, Oleg wrote: > On May 22, 2015, at 7:57 PM, Joe Perches wrote: > > On Fri, 2015-05-22 at 21:16 +0000, Drokin, Oleg wrote: > >> On May 22, 2015, at 11:42 AM, Joe Perches wrote: > >>> On Fri, 2015-05-22 at 08:08 +0000, Drokin, Oleg wrote: > >>>> On May 22, 2015, at 1:06 AM, Julia Lawall wrote: > >>>>> On Thu, 21 May 2015, Michael Shuey wrote: > >>>>> > >>>>>> That's a task (of many) I've been putting on the back burner until the code > >>>>>> is cleaner. It's also a HUGE change, since there are debug macros > >>>>>> everywhere, and they all check a #define'd mask to see if they should fire, > >>>>>> and the behavior is likely governed by parts of the lustre user land tools > >>>>>> as well. > >>>>>> > >>>>>> Suggestions are welcome. Do other parts of the linux kernel define complex > >>>>>> debugging macros like these, or is this a lustre-ism? Any suggestions on > >>>>>> how to handle this more in line with existing drivers? > >>>>> > >>>>> Once you decide what to do, you can use Coccinelle to make the changes for > >>>>> you. So you shouldn't be put off by the number of code sites to change. > >>>>> > >>>>> The normal functions are pr_err, pr_warn, etc. Perhaps you can follow > >>>>> Joe's suggestions if you really need something more complicated. > >>>> > >>>> Ideally leaving CERROR/CDEBUG in Lustre would be desirable from my perspective. > >>> > >>> My issue with CERROR is the name is little misleading. > >>> It's actually a debugging message. > >>> #define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__) > >> > >> Except it's not a debugging message. > >> There is a clear distinction. > > > > Not really. If the first reading shows that the mechanism it > > goes through is called CDEBUG, a reasonable expectation should > > be that it's a debugging message. > > Well, various pr_err/pr_dbg for example, go through printk in the end too. > Do that make them the same? No, because each is labeled with the KERN_ that it uses. [] > >> I wonder what is more clear about that in your opinion ve > >> lustre_error/lustre_debug? > > > > The fact that you have to explain this shows that it's > > at least misleading unless you completely understand the > > code. > > Or you know, you might take the function name at the face value > and assume that CERROR means it's an error and CDEBUG means it's a debug message? Maybe, but I think that it'd be better if the mechanism it uses was more plainly named something like lustre_log. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/