From 5dd1b44acf36f1f1d1bd79730734c24dff900135 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 24 May 2010 14:33:30 -0700 Subject: [PATCH] --- yaml --- r: 198314 b: refs/heads/master c: d4977c78e9c7dd042f96f4a21d957bc25a561333 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0652baf88147..aadb29c4dd3c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3354957a4f8b9bb4b43625232acdf0626851c82f +refs/heads/master: d4977c78e9c7dd042f96f4a21d957bc25a561333 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index de0f4672cb74..bd88f11b0953 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -2601,6 +2601,11 @@ sub process { CHK("architecture specific defines should be avoided\n" . $herecurr); } +# Check that the storage class is at the beginning of a declaration + if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) { + WARN("storage class should be at the beginning of the declaration\n" . $herecurr) + } + # check the location of the inline attribute, that it is between # storage class and type. if ($line =~ /\b$Type\s+$Inline\b/ ||