projects/linux·commit 8ea3eb9a

checkpatch: handle return types of pointers to functions

8ea3eb9a · Andy Whitcroft <[email protected]> · 2008-07-23 21:29:08 -07:00

Make sure we correctly mark the return type of the pointer to a function
declaration.

    const void *(*sb_tag)(struct sysfs_tag_info *info);

Signed-off-by: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
8ea3eb9a20f39d5afa52900a34092b4b5f6b55cb
Parents
b8f96a31

Changes

1 files changed · +1 −1

FileStatusAddDelContent
scripts/checkpatch.plmodified+1−1View file

scripts/checkpatch.pl

View file
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 775f2b1..6d07b67 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -715,7 +715,7 @@ sub annotate_values {
$av_preprocessor = 0;
}
- } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\))/) {
+ } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\()/) {
print "DECLARE($1)\n" if ($dbg_values > 1);
$type = 'T';