mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
checkpatch.pl: Add warning for new __packed additions
While there are valid reasons to use __packed, often the answer is that you should be doing something else here instead. Signed-off-by: Tom Rini <trini@ti.com>
This commit is contained in:
parent
b60eff31f3
commit
f503cc49a5
1 changed files with 5 additions and 0 deletions
|
@ -3331,6 +3331,11 @@ sub process {
|
|||
WARN("PREFER_PACKED",
|
||||
"__packed is preferred over __attribute__((packed))\n" . $herecurr);
|
||||
}
|
||||
# Check for new packed members, warn to use care
|
||||
if ($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 ($line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
|
||||
|
|
Loading…
Reference in a new issue