[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1648085610-24545-1-git-send-email-baihaowen@meizu.com>
Date: Thu, 24 Mar 2022 09:33:30 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: <len.brown@...el.com>
CC: <linux-kernel@...r.kernel.org>, Haowen Bai <baihaowen@...zu.com>
Subject: [PATCH] tools/power/x86_energy_perf_policy: Fix warning comparing pointer to 0
Avoid pointer type value compared with 0 to make code clear.
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
index 5fd9e59..fd2b982 100644
--- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
+++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
@@ -1517,7 +1517,7 @@ int main(int argc, char **argv)
parse_cpuid();
/* If CPU-set and PKG-set are not initialized, default to all CPUs */
- if ((cpu_selected_set == 0) && (pkg_selected_set == 0))
+ if ((cpu_selected_set == NULL) && (pkg_selected_set == 0))
cpu_selected_set = cpu_present_set;
/*
--
2.7.4
Powered by blists - more mailing lists