aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b14f830cb0fa..8f35f0e03518 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2891,6 +2891,11 @@ sub process {
2891 WARN("__packed is preferred over __attribute__((packed))\n" . $herecurr); 2891 WARN("__packed is preferred over __attribute__((packed))\n" . $herecurr);
2892 } 2892 }
2893 2893
2894# Check for __attribute__ aligned, prefer __aligned
2895 if ($line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
2896 WARN("__aligned(size) is preferred over __attribute__((aligned(size)))\n" . $herecurr);
2897 }
2898
2894# check for sizeof(&) 2899# check for sizeof(&)
2895 if ($line =~ /\bsizeof\s*\(\s*\&/) { 2900 if ($line =~ /\bsizeof\s*\(\s*\&/) {
2896 WARN("sizeof(& should be avoided\n" . $herecurr); 2901 WARN("sizeof(& should be avoided\n" . $herecurr);