浏览代码

checkpatch: handle return types of pointers to functions

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@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andy Whitcroft 17 年之前
父节点
当前提交
8ea3eb9a20
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/checkpatch.pl

+ 1 - 1
scripts/checkpatch.pl

@@ -715,7 +715,7 @@ sub annotate_values {
 				$av_preprocessor = 0;
 				$av_preprocessor = 0;
 			}
 			}
 
 
-		} elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\))/) {
+		} elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\()/) {
 			print "DECLARE($1)\n" if ($dbg_values > 1);
 			print "DECLARE($1)\n" if ($dbg_values > 1);
 			$type = 'T';
 			$type = 'T';