[RFC PATCH v1 2/3] scripts: warn on tcg_gen_print usage to the checkpatch.pl

Chao Liu posted 3 patches 1 month, 2 weeks ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
[RFC PATCH v1 2/3] scripts: warn on tcg_gen_print usage to the checkpatch.pl
Posted by Chao Liu 1 month, 2 weeks ago
Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
---
 scripts/checkpatch.pl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3a9557417f..43d3db9f38 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1985,6 +1985,11 @@ sub process {
 			ERROR("adding a line without newline at end of file\n" . $herecurr);
 		}
 
+# check for tcg_gen_print is present in submitted patches
+		if ($rawline =~ /^\+.*\btcg_gen_print\s*\(/) {
+			WARN("tcg_gen_print(): debug-only, remove all calls before patch submission.\n" . $herecurr);
+		}
+
 # check for RCS/CVS revision markers
 		if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|\b)/) {
 			ERROR("CVS style keyword markers, these will _not_ be updated\n". $herecurr);
-- 
2.52.0