Prefer the use of __aligned(size) over __attribute__((__aligned___(size))) Link: http://lkml.kernel.org/r/20110609094526.1571774c.akpm@linux-foundation.org
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -2891,6 +2891,11 @@ sub process { · 2890 unmodified lines | ||
| 2891 | 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 | 2899 | # check for sizeof(&) |
| 2895 | 2900 | if ($line =~ /\bsizeof\s*\(\s*\&/) { |
| 2896 | 2901 | WARN("sizeof(& should be avoided\n" . $herecurr); |