mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] checkpatch hangs at value annotation
@ 2016-09-28 12:17 Jan Höppner
  2016-10-26  9:04 ` Jan Höppner
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Höppner @ 2016-09-28 12:17 UTC (permalink / raw)
  To: apw; +Cc: joe, linux-kernel

Hi Andy,

when I check the following patch example with checkpatch it will hang forever.

diff --git a/test.c b/test.c
index 88c2eb0cb608..583625fdb715 100644
--- a/test.c
+++ b/test.c
@@ -1 +1,3 @@
 uint## BITS ##_t foobar;
+
+printk(KERN_WARNING "DEBUG: FOOBAR\n");


The hang is due to the spaces in the concatenation in the first line.
When you remove the space (like this uint##BITS##_t) it will run
through just fine.

I debugged the script with perl -d a little and found that the problem
is somewhere in the annotate_values sub-routine. It will always jump
in this block:

} elsif ($cur =~ /^($Modifier)\s*/) {
        print "MODIFIER($1)\n" if ($dbg_values > 1);
        $type = 'T';

}

$1 seems to be undefined even though the regex matched. However, $1
needs to be defined so that the loop can move on with evaluating the
rest of the current string (see end of the routine).

If you want me to try a few more things or provide more data, please
let me know. Due to lack of time and a vague knowledge of perl, I'm
not able to provide a proposal for a proper fix.

Best regards,
Jan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-26  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28 12:17 [BUG] checkpatch hangs at value annotation Jan Höppner
2016-10-26  9:04 ` Jan Höppner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®