diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 6afc24ba77a6b067941c7b1b1223fdbe33c05c6a..6ac355edd0dc843c110c0aa316901afe7ebd6278 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4260,6 +4260,7 @@ sub process {
 			$ctx = $dstat;
 
 			$dstat =~ s/\\\n.//g;
+			$dstat =~ s/$;/ /g;
 
 			if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) {
 				my $stmts = $2;