[PATCH 21/23] checkpatch: handle return types of pointers to functions

From: Andy Whitcroft
Date: Thu Jun 12 2008 - 08:28:33 EST


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 <apw@xxxxxxxxxxxx>
---
scripts/checkpatch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

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';

--
1.5.6.rc0.140.ga9675

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/