aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorValentin Schneider2023-09-01 17:10:38 +0200
committerSteven Rostedt (Google)2023-09-01 21:27:22 -0400
commit2900bcbee3899e900853be555665f126673141b7 (patch)
tree374b10541e73fc53b63adb77970bb26a65b1c9a0 /kernel
parent1caf7adb9e000479d2bd29c86b6d7eaeb24b1b05 (diff)
tracing/filters: Change parse_pred() cpulist ternary into an if block
Review comments noted that an if block would be clearer than a ternary, so swap it out. No change in behaviour intended Link: https://lkml.kernel.org/r/20230901151039.125186-4-vschneid@redhat.com Cc: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_events_filter.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index eb331e8b00b6..09b4733a2933 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1782,13 +1782,17 @@ static int parse_pred(const char *str, void *data,
FILTER_PRED_FN_CPUMASK;
} else if (field->filter_type == FILTER_CPU) {
if (single) {
- pred->op = pred->op == OP_BAND ? OP_EQ : pred->op;
+ if (pred->op == OP_BAND)
+ pred->op = OP_EQ;
+
pred->fn_num = FILTER_PRED_FN_CPU;
} else {
pred->fn_num = FILTER_PRED_FN_CPU_CPUMASK;
}
} else if (single) {
- pred->op = pred->op == OP_BAND ? OP_EQ : pred->op;
+ if (pred->op == OP_BAND)
+ pred->op = OP_EQ;
+
pred->fn_num = select_comparison_fn(pred->op, field->size, false);
if (pred->op == OP_NE)
pred->not = 1;