Commit 5c761ce58666b3a1695697498598f8bf3484a0c7
Committed by
Tom Rini
1 parent
e2888a7fa7
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
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. This reintroduces the changes of f503cc49a570 (Add warning for new __packed additions) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff
scripts/checkpatch.pl
... | ... | @@ -5616,6 +5616,13 @@ |
5616 | 5616 | "__packed is preferred over __attribute__((packed))\n" . $herecurr); |
5617 | 5617 | } |
5618 | 5618 | |
5619 | +# Check for new packed members, warn to use care | |
5620 | + if ($realfile !~ m@\binclude/uapi/@ && | |
5621 | + $line =~ /\b(__attribute__\s*\(\s*\(.*\bpacked|__packed)\b/) { | |
5622 | + WARN("NEW_PACKED", | |
5623 | + "Adding new packed members is to be done with care\n" . $herecurr); | |
5624 | + } | |
5625 | + | |
5619 | 5626 | # Check for __attribute__ aligned, prefer __aligned |
5620 | 5627 | if ($realfile !~ m@\binclude/uapi/@ && |
5621 | 5628 | $line =~ /\b__attribute__\s*\(\s*\(.*aligned/) { |
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2
-
mentioned in commit c398f2