[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1255945754-2160-1-git-send-email-w.sang@pengutronix.de>
Date: Mon, 19 Oct 2009 11:49:14 +0200
From: Wolfram Sang <w.sang@...gutronix.de>
To: linux-kernel@...r.kernel.org
Cc: Wolfram Sang <w.sang@...gutronix.de>,
Andy Whitcroft <apw@...dowen.org>
Subject: [PATCH] checkpatch: fix false positive on __initconst
checkpatch falsely complained about '__initconst' because it thought the
'const' needed a space before. Fix this by changing the list of attributes:
- add '__initconst'
- force plain 'init' to contain a word-boundary at the end
Signed-off-by: Wolfram Sang <w.sang@...gutronix.de>
Cc: Andy Whitcroft <apw@...dowen.org>
---
Not entirely sure if adding the word boundary may cause a side-effect which I
overlooked. A few more eyes on this would be great.
scripts/checkpatch.pl | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 87bbb8b..0a47a1f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -142,11 +142,14 @@ our $Sparse = qr{
__kprobes|
__ref
}x;
+
+# Notes to $Attribute:
+# We need \b after 'init' otherwise 'initconst' will cause a false positive in a check
our $Attribute = qr{
const|
__read_mostly|
__kprobes|
- __(?:mem|cpu|dev|)(?:initdata|init)|
+ __(?:mem|cpu|dev|)(?:initdata|initconst|init\b)|
____cacheline_aligned|
____cacheline_aligned_in_smp|
____cacheline_internodealigned_in_smp|
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists