Messages in this thread Patch in this message | | | From | Haowen Bai <> | Subject | [PATCH] perf/x86/amd: Return true/false (not 1/0) from bool functions | Date | Thu, 7 Apr 2022 10:41:22 +0800 |
| |
Return boolean values ("true" or "false") instead of 1 or 0 from bool functions. This fixes the following warnings from coccicheck:
arch/x86/events/amd/brs.c:202:9-10: WARNING: return of 0/1 in function 'amd_brs_match_plm' with return type bool
Signed-off-by: Haowen Bai <baihaowen@meizu.com> --- arch/x86/events/amd/brs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/events/amd/brs.c b/arch/x86/events/amd/brs.c index 895c82165d85..44c80a3ab9f0 100644 --- a/arch/x86/events/amd/brs.c +++ b/arch/x86/events/amd/brs.c @@ -199,12 +199,12 @@ static bool amd_brs_match_plm(struct perf_event *event, u64 to) int plm_u = PERF_SAMPLE_BRANCH_USER; if (!(type & plm_k) && kernel_ip(to)) - return 0; + return false; if (!(type & plm_u) && !kernel_ip(to)) - return 0; + return false; - return 1; + return true; } /* -- 2.7.4
| |