]> Git Repo - qemu.git/blobdiff - scripts/checkpatch.pl
net/colo.c: Add vnet packet parse feature in colo-proxy
[qemu.git] / scripts / checkpatch.pl
index 45027b92816a557e3e3b76842f5a420a73b23494..4e911228137cb909bfc9803dd7cccabff402d67f 100755 (executable)
@@ -2473,6 +2473,10 @@ sub process {
                if ($line =~ /\b(strto[^kd].*?)\s*\(/) {
                        ERROR("consider using qemu_$1 in preference to $1\n" . $herecurr);
                }
+# recommend sigaction over signal for portability, when establishing a handler
+               if ($line =~ /\bsignal\s*\(/ && !($line =~ /SIG_(?:IGN|DFL)/)) {
+                       ERROR("use sigaction to establish signal handlers; signal is not portable\n" . $herecurr);
+               }
 # check for module_init(), use category-specific init macros explicitly please
                if ($line =~ /^module_init\s*\(/) {
                        ERROR("please use block_init(), type_init() etc. instead of module_init()\n" . $herecurr);
@@ -2529,9 +2533,14 @@ sub process {
                                error_setg_file_open|
                                error_set|
                                error_prepend|
+                               warn_reportf_err|
                                error_reportf_err|
                                error_vreport|
-                               error_report}x;
+                               warn_vreport|
+                               info_vreport|
+                               error_report|
+                               warn_report|
+                               info_report}x;
 
        if ($rawline =~ /\b(?:$qemu_error_funcs)\s*\(.*\".*\\n/) {
                ERROR("Error messages should not contain newlines\n" . $herecurr);
This page took 0.024107 seconds and 4 git commands to generate.