From: Johan Malm Date: Mon, 3 Jul 2023 16:04:15 +0000 (+0100) Subject: checkpatch.pl: remove 'spaces preferred around that...' warning X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=0958e88c754e38f51efa14dbd4248c1ea4ad1698;p=proto%2Flabwc.git checkpatch.pl: remove 'spaces preferred around that...' warning ...because it gives a false positive for "xmlChar *foo" saying it should be "xmlChar * foo". --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 45a7b0b0..fcb838d0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5104,14 +5104,14 @@ sub process { { if ($check) { if (defined $fix_elements[$n + 2] && $ctx !~ /[EW]x[EW]/) { - if (CHK("SPACING", - "spaces preferred around that '$op' $at\n" . $hereptr)) { - $good = rtrim($fix_elements[$n]) . " " . trim($fix_elements[$n + 1]) . " "; - $fix_elements[$n + 2] =~ s/^\s+//; - $line_fixed = 1; - } - } elsif (!defined $fix_elements[$n + 2] && $ctx !~ /Wx[OE]/) { - if (CHK("SPACING", +# if (CHK("SPACING", +# "spaces preferred around that '$op' $at\n" . $hereptr)) { +# $good = rtrim($fix_elements[$n]) . " " . trim($fix_elements[$n + 1]) . " "; +# $fix_elements[$n + 2] =~ s/^\s+//; +# $line_fixed = 1; +# } + } elsif (!defined $fix_elements[$n + 2] && $ctx !~ /Wx[OE]/) { + if (CHK("SPACING", "space preferred before that '$op' $at\n" . $hereptr)) { $good = rtrim($fix_elements[$n]) . " " . trim($fix_elements[$n + 1]); $line_fixed = 1;