Whamcloud - gitweb
LU-12822 uapi: properly pack data structures
[fs/lustre-release.git] / contrib / scripts / checkpatch.pl
index 1e9bf50..15b9dd6 100755 (executable)
@@ -5638,16 +5638,16 @@ sub process {
                        }
                }
 
-# Check for __attribute__ packed, prefer __packed
+# Check for __packed, prefer __attribute__ packed
                if ($realfile !~ m@\binclude/uapi/@ &&
-                   $line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
+                   $line =~ /\b__packed\b/) {
                        WARN("PREFER_PACKED",
                             "__packed is preferred over __attribute__((packed))\n" . $herecurr);
                }
 
-# Check for __attribute__ aligned, prefer __aligned
+# Check for __aligned, prefer __attribute__ aligned
                if ($realfile !~ m@\binclude/uapi/@ &&
-                   $line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
+                   $line =~ /\b__aligned\b/) {
                        WARN("PREFER_ALIGNED",
                             "__aligned(size) is preferred over __attribute__((aligned(size)))\n" . $herecurr);
                }