From: Jules Irenge <jbi.octave@gmail.com>
To: mark.rutland@arm.com
Cc: alexander.shishkin@linux.intel.com, jolsa@kernel.org,
namhyung@kernel.org, linux-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org, adrian.hunter@intel.com
Subject: [PATCH 1/3] perf tool x86: Remove unnecessary conversion to bool
Date: Fri, 3 Nov 2023 23:50:31 +0000 [thread overview]
Message-ID: <ZUWHRwR-n5y9vE9o@octinomon> (raw)
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
reply other threads:[~2023-11-03 23:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZUWHRwR-n5y9vE9o@octinomon \
--to=jbi.octave@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).