Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755756AbbEVCqX (ORCPT ); Thu, 21 May 2015 22:46:23 -0400 Received: from smtprelay0149.hostedemail.com ([216.40.44.149]:54122 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752558AbbEVCqW (ORCPT ); Thu, 21 May 2015 22:46:22 -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:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3874:4250:4321:5007:6119:6261:7903:10004:10400:10848:11026:11232:11473:11658:11914:12517:12519:12740:13069:13311:13357: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: power83_7162f8ee8fa42 X-Filterd-Recvd-Size: 2278 Message-ID: <1432262778.20840.79.camel@perches.com> Subject: Re: [PATCH v4 10/13] staging: lustre: lnet: lnet: checkpatch.pl fixes From: Joe Perches To: Michael Shuey Cc: Julia Lawall , "Drokin, Oleg" , devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, HPDD-discuss@ml01.01.org, lustre-devel@lists.lustre.org Date: Thu, 21 May 2015 19:46:18 -0700 In-Reply-To: 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> 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: 1247 Lines: 31 On Thu, 2015-05-21 at 18:04 -0400, 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? Yes, many other bits of code use custom debugging macros. A good general form is to add a either a generic level or bitmask macro and use a single entry like: my_dbg([optional_ptr,] , fmt, ...) so that can be tested against some variable set by MODULE_PARM_DESC controls. So, CNETERR(...) might be lustre_dbg(ptr, NETERR, fmt, ...) though I don't know what use the ptr might have. -- 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/