summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/checkpatch.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2287a0bca8..4142f5c837 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5616,6 +5616,13 @@ sub process {
"__packed is preferred over __attribute__((packed))\n" . $herecurr);
}
+# Check for new packed members, warn to use care
+ if ($realfile !~ m@\binclude/uapi/@ &&
+ $line =~ /\b(__attribute__\s*\(\s*\(.*\bpacked|__packed)\b/) {
+ WARN("NEW_PACKED",
+ "Adding new packed members is to be done with care\n" . $herecurr);
+ }
+
# Check for __attribute__ aligned, prefer __aligned
if ($realfile !~ m@\binclude/uapi/@ &&
$line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {