summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2020-12-15 20:44:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 22:46:17 -0800
commit0830aab0e1d4d9bd391e5723c39f4b3b002fffb3 (patch)
tree84553d7e295f73c3566fa9cf1e1ec106a4f890c1 /scripts
parent7580c5b9b464f8936be850ef278927671338bbf2 (diff)
downloadlinux-0830aab0e1d4d9bd391e5723c39f4b3b002fffb3.tar.gz
linux-0830aab0e1d4d9bd391e5723c39f4b3b002fffb3.tar.bz2
linux-0830aab0e1d4d9bd391e5723c39f4b3b002fffb3.zip
checkpatch: add __alias and __weak to suggested __attribute__ conversions
Add __alias and __weak to the suggested __attribute__((<foo>)) conversions. Link: https://lkml.kernel.org/r/7b74137743c58ce0633ec4d575b94e2210e4dbe7.camel@perches.com Signed-off-by: Joe Perches <joe@perches.com> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3480bcb9bbc6..5a1096a4e220 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6200,6 +6200,7 @@ sub process {
$attr =~ s/\s*\(\s*(.*)\)\s*/$1/;
my %attr_list = (
+ "alias" => "__alias",
"aligned" => "__aligned",
"always_inline" => "__always_inline",
"assume_aligned" => "__assume_aligned",
@@ -6220,7 +6221,8 @@ sub process {
"packed" => "__packed",
"pure" => "__pure",
"section" => "__section",
- "used" => "__used"
+ "used" => "__used",
+ "weak" => "__weak"
);
while ($attr =~ /\s*(\w+)\s*(${balanced_parens})?/g) {