]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: add a test for const with __read_mostly uses
authorJoe Perches <joe@perches.com>
Thu, 16 Apr 2015 19:44:42 +0000 (12:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:03:58 +0000 (09:03 -0400)
commit4c6303d2fa3b2ee8cd360aee66d0572d80cfcef5
treef3e590db15b6f5fac82efbc8b5353d9c382b715d
parente0f544746e0565f746a414b45a9cdb74b545319a
checkpatch: add a test for const with __read_mostly uses

const objects shouldn't be __read_mostly.  They are read-only.

Marking these objects as __read_mostly causes section conflicts with LTO
linking.

So add a test to try to avoid this issue.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl