Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964976Ab3FSWtK (ORCPT ); Wed, 19 Jun 2013 18:49:10 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:39248 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935028Ab3FSWtI (ORCPT ); Wed, 19 Jun 2013 18:49:08 -0400 From: Joe Perches To: Andrew Morton Cc: Jacob Keller , Jeff Kirsher , Andy Whitcroft , Aaron Brown , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2] checkpatch: Allow longer logging function names Date: Wed, 19 Jun 2013 15:49:03 -0700 Message-Id: <96448a1645250ccd9b1a301d6d65198f31a02551.1371681561.git.joe@perches.com> X-Mailer: git-send-email 1.8.1.2.459.gbcd45b4.dirty In-Reply-To: <02874ECE860811409154E81DA85FBB585650A046@ORSMSX104.amr.corp.intel.com> References: <02874ECE860811409154E81DA85FBB585650A046@ORSMSX104.amr.corp.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1550 Lines: 39 From: Jacob Keller The current $logFunction regular expression allows names like dev_warn, e_dbg, netdev_info, etc, but some log functions are now written like e_dev_warn, so allow 1 or 2 word blocks with an underscore before the logging level. Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Joe Perches --- jp: Modified Jacob's patch and commit message to limit the number of word blocks because foo_bar_baz_dev_warn is just too long to live. scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 7e8aa1b..1034c9b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -280,7 +280,7 @@ our $typeTypedefs = qr{(?x: our $logFunctions = qr{(?x: printk(?:_ratelimited|_once|)| - [a-z0-9]+_(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| + (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| WARN(?:_RATELIMIT|_ONCE|)| panic| MODULE_[A-Z_]+ -- 1.8.1.2.459.gbcd45b4.dirty -- 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/