Whamcloud - gitweb
LU-15197 llite: Do not count tiny write twice
[fs/lustre-release.git] / contrib / scripts / checkpatch.pl
index 1e9bf50..b4a20d6 100755 (executable)
@@ -457,7 +457,7 @@ our $logFunctions = qr{(?x:
        printk(?:_ratelimited|_once|_deferred_once|_deferred|)|
        (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
        WARN(?:_RATELIMIT|_ONCE|)|
-       CDEBUG|CERROR|CL_LOCK_DEBUG|CWARN|DEBUG_REQ|LCONSOLE_[A-Z]*|
+       CDEBUG|CERROR|CNETERR|CEMERG|CL_LOCK_DEBUG|CWARN|DEBUG_REQ|LCONSOLE_[A-Z]*|
        panic|
        MODULE_[A-Z_]+|
        seq_vprintf|seq_printf|seq_puts
@@ -3042,7 +3042,7 @@ sub process {
 
 # Block comment styles
 # Networking with an initial /*
-               if ($realfile =~ m@^(drivers/net/|net/)@ &&
+               if ($realfile =~ m@^(drivers/net/|net/|lnet)@ &&
                    $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
                    $rawline =~ /^\+[ \t]*\*/ &&
                    $realline > 2) {
@@ -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);
                }