[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ZUWHRwR-n5y9vE9o@octinomon>
Date: Fri, 3 Nov 2023 23:50:31 +0000
From: Jules Irenge <jbi.octave@...il.com>
To: mark.rutland@....com
Cc: alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
namhyung@...nel.org, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, adrian.hunter@...el.com
Subject: [PATCH 1/3] perf tool x86: Remove unnecessary conversion to bool
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@...il.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
Powered by blists - more mailing lists