diff mbox series

[v2,2/6] kernel-shark: Fix bug in bool kshark_export_all_cpu_filters()

Message ID 20200330160652.28424-3-y.karadz@gmail.com (mailing list archive)
State Accepted
Commit f5ede981bd663042b9df0edee5559661cc520a6f
Delegated to: Steven Rostedt
Headers show
Series kernel-shark: Optimize the logic of the filtering menus | expand

Commit Message

Yordan Karadzhov March 30, 2020, 4:06 p.m. UTC
It makes no sense to check if a Task filter is set, before exporting
a CPU filter. This is most probably a copy/paste bug.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 kernel-shark/src/libkshark-configio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/kernel-shark/src/libkshark-configio.c b/kernel-shark/src/libkshark-configio.c
index f01a39b..cb7ca54 100644
--- a/kernel-shark/src/libkshark-configio.c
+++ b/kernel-shark/src/libkshark-configio.c
@@ -1407,12 +1407,12 @@  bool kshark_export_all_cpu_filters(struct kshark_context *kshark_ctx,
 		return false;
 
 	/* Save a filter only if it contains Id values. */
-	if (kshark_this_filter_is_set(kshark_ctx->show_task_filter))
+	if (kshark_this_filter_is_set(kshark_ctx->show_cpu_filter))
 		ret &= kshark_export_filter_array(kshark_ctx->show_cpu_filter,
 						  KS_SHOW_CPU_FILTER_NAME,
 						  *conf);
 
-	if (kshark_this_filter_is_set(kshark_ctx->hide_task_filter))
+	if (kshark_this_filter_is_set(kshark_ctx->hide_cpu_filter))
 		ret &= kshark_export_filter_array(kshark_ctx->hide_cpu_filter,
 						  KS_HIDE_CPU_FILTER_NAME,
 						  *conf);