qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] checkpatch: replace ERROR with WARN for extern chec


From: Jiang Biao
Subject: [Qemu-devel] [PATCH] checkpatch: replace ERROR with WARN for extern checking.
Date: Wed, 11 Oct 2017 12:33:26 +0800

There are some rare cases which need external declarations in .c
files. patchew.org and checkpatch.pl will complain errors on
patches for these declarations.

Degrade ERROR to WARN to erase the error complaints taking
checkpatch.pl in kernel as reference.

Signed-off-by: Jiang Biao <address@hidden>
---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3c0a28e..9123788 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2546,7 +2546,7 @@ sub process {
                        if ($s =~ /^\s*;/ &&
                            $function_name ne 'uninitialized_var')
                        {
-                               ERROR("externs should be avoided in .c files\n" 
.  $herecurr);
+                               WARN("externs should be avoided in .c files\n" 
.  $herecurr);
                        }
 
                        if ($paren_space =~ /\n/) {
@@ -2556,7 +2556,7 @@ sub process {
                } elsif ($realfile =~ /\.c$/ && defined $stat &&
                    $stat =~ /^.\s*extern\s+/)
                {
-                       ERROR("externs should be avoided in .c files\n" .  
$herecurr);
+                       WARN("externs should be avoided in .c files\n" .  
$herecurr);
                }
 
 # check for pointless casting of g_malloc return
-- 
2.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]