* [PATCH 1/3] perf tool x86: Remove unnecessary conversion to bool
@ 2023-11-03 23:50 Jules Irenge
0 siblings, 0 replies; only message in thread
From: Jules Irenge @ 2023-11-03 23:50 UTC (permalink / raw)
To: mark.rutland
Cc: alexander.shishkin, jolsa, namhyung, linux-kernel,
linux-perf-users, adrian.hunter
coccinelle reports a warning at x86__is_amd_cpu()
WARNING: conversion to bool not needed here
To fix this, the unnecessary bool conversion is removed here
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
tools/perf/arch/x86/util/env.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/arch/x86/util/env.c b/tools/perf/arch/x86/util/env.c
index 3e537ffb1353..5b0db77f8e0f 100644
--- a/tools/perf/arch/x86/util/env.c
+++ b/tools/perf/arch/x86/util/env.c
@@ -15,5 +15,5 @@ bool x86__is_amd_cpu(void)
is_amd = env.cpuid && strstarts(env.cpuid, "AuthenticAMD") ? 1 : -1;
perf_env__exit(&env);
ret:
- return is_amd >= 1 ? true : false;
+ return is_amd >= 1;
}
--
2.41.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-03 23:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 23:50 [PATCH 1/3] perf tool x86: Remove unnecessary conversion to bool Jules Irenge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).