summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2010-03-05 13:43:51 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 11:26:44 -0800
commit52131292c069b74f4b5f3c786ff66ff6e82b0e69 (patch)
treeb84324464503adc35bda0573c1c35f7497d9ecce /scripts/checkpatch.pl
parent691e669ba8c64d31ac08d87b1751e6acfa3ff65e (diff)
downloadlinux-3.10-52131292c069b74f4b5f3c786ff66ff6e82b0e69.tar.gz
linux-3.10-52131292c069b74f4b5f3c786ff66ff6e82b0e69.tar.bz2
linux-3.10-52131292c069b74f4b5f3c786ff66ff6e82b0e69.zip
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@pengutronix.de> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9a3894dbf75..1530dbf1dab 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -145,11 +145,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|