Patchwork [v2,1/4] CHECKPATCH: Add --debug adv_dcs

login
register
mail settings
Submitter Don Slutz
Date Sept. 2, 2012, 11:22 p.m.
Message ID <1346628158-30403-2-git-send-email-Don@CloudSwitch.com>
Download mbox | patch
Permalink /patch/181273/
State New
Headers show

Comments

Don Slutz - Sept. 2, 2012, 11:22 p.m.
Add debug options to find this issue.  They were not listed
in the help because the are not simple to understand the output of.

Signed-off-by: Don Slutz <Don@CloudSwitch.com>
---
 scripts/checkpatch.pl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b98dc6c..0b0f3f3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -97,6 +97,7 @@  my $dbg_values = 0;
 my $dbg_possible = 0;
 my $dbg_type = 0;
 my $dbg_attr = 0;
+my $dbg_adv_dcs = 0;
 for my $key (keys %debug) {
 	## no critic
 	eval "\${dbg_$key} = '$debug{$key}';";
@@ -2575,6 +2576,8 @@  sub process {
 					$allowed = 1;
 				}
 			}
+                        print "DCS: level=$level block<$block> allowed=$allowed\n"
+                            if $dbg_adv_dcs;
 			if ($level == 0 && $block !~ /^\s*\{/ && !$allowed) {
 				my $herectx = $here . "\n";;
 				my $cnt = statement_rawlines($block);