From: David Lamparter Date: Sun, 21 Jul 2024 19:19:44 +0000 (-0700) Subject: tools/checkpatch: recognize `+` as unary operator X-Git-Tag: base_10.2~220^2~11 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=67a76894b70f73c62b7eb2d05a02ef282c16ec82;p=matthieu%2Ffrr.git tools/checkpatch: recognize `+` as unary operator Allow using "+1" when meaningful (i.e. cmd_graph_merge wants -1 or +1) Signed-off-by: David Lamparter --- diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl index 3e7abeda39..2c773f7fbc 100755 --- a/tools/checkpatch.pl +++ b/tools/checkpatch.pl @@ -5150,7 +5150,7 @@ sub process { # none after. May be left adjacent to another # unary operator, or a cast } elsif ($op eq '!' || $op eq '~' || - $opv eq '*U' || $opv eq '-U' || + $opv eq '*U' || $opv eq '-U' || $opv eq '+U' || $opv eq '&U' || $opv eq '&&U') { if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) { if (ERROR("SPACING",