scripts: checkpatch: allow parentheses around operators

Some macros, e.g., FOR_EACH_FIXED_ARG, require a separator argument that
needs to be in parentheses, e.g., (||). This should not trigger a
checkpatch warning.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-03-07 16:03:08 +01:00 committed by Carles Cufí
parent adc901aa6a
commit 6a273838e4

View file

@ -4726,6 +4726,13 @@ sub process {
$ok = 1;
}
# some macros require a separator
# argument to be in parentheses,
# e.g. (||).
if ($ca =~ /\($/ || $cc =~ /^\)/) {
$ok = 1;
}
# messages are ERROR, but ?: are CHK
if ($ok == 0) {
my $msg_level = \&ERROR;