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:
parent
adc901aa6a
commit
6a273838e4
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue