From: Andy Whitcroft Date: Thu, 24 Jul 2008 04:29:12 +0000 (-0700) Subject: checkpatch: types cannot start mid word for pointer tests X-Git-Tag: v2.6.27-rc1~692 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=234fff6515a11cf3e67c793146689da426787fea;p=linux-2.6-omap-h63xx.git checkpatch: types cannot start mid word for pointer tests When checking spacing for pointer checks the type cannot start in the middle of a word, ie. this is not 'int * bar': x = fooint * bar; Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 96a762be574..022ee557b68 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1435,11 +1435,11 @@ sub process { ERROR("\"(foo $1 )\" should be \"(foo $1)\"\n" . $herecurr); - } elsif ($line =~ m{$NonptrType(\*+)(?:\s+(?:$Attribute|$Sparse))?\s+[A-Za-z\d_]+}) { + } elsif ($line =~ m{\b$NonptrType(\*+)(?:\s+(?:$Attribute|$Sparse))?\s+[A-Za-z\d_]+}) { ERROR("\"foo$1 bar\" should be \"foo $1bar\"\n" . $herecurr); - } elsif ($line =~ m{$NonptrType\s+(\*+)(?!\s+(?:$Attribute|$Sparse))\s+[A-Za-z\d_]+}) { + } elsif ($line =~ m{\b$NonptrType\s+(\*+)(?!\s+(?:$Attribute|$Sparse))\s+[A-Za-z\d_]+}) { ERROR("\"foo $1 bar\" should be \"foo $1bar\"\n" . $herecurr); }