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 fd9560ea976c..4c0383da1c9a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2743,6 +2743,11 @@ sub process {
2743 WARN("plain inline is preferred over $1\n" . $herecurr); 2743 WARN("plain inline is preferred over $1\n" . $herecurr);
2744 } 2744 }
2745 2745
2746# Check for __attribute__ packed, prefer __packed
2747 if ($line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
2748 WARN("__packed is preferred over __attribute__((packed))\n" . $herecurr);
2749 }
2750
2746# check for sizeof(&) 2751# check for sizeof(&)
2747 if ($line =~ /\bsizeof\s*\(\s*\&/) { 2752 if ($line =~ /\bsizeof\s*\(\s*\&/) {
2748 WARN("sizeof(& should be avoided\n" . $herecurr); 2753 WARN("sizeof(& should be avoided\n" . $herecurr);