Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp815177rdf; Fri, 3 Nov 2023 16:54:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH00oWSEimmO8QGKM7nPV5LgnmkMI7TA6v1DtpQZjfek4NQuWMy1xQjwIsAuG01cde8aBcA X-Received: by 2002:a05:690c:dd4:b0:5a7:da0d:e4ee with SMTP id db20-20020a05690c0dd400b005a7da0de4eemr5605304ywb.16.1699055661587; Fri, 03 Nov 2023 16:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699055661; cv=none; d=google.com; s=arc-20160816; b=q9Z75p3SSF8S+2+X/PZ7WrmhmcM+JSejfXE7GPfZJY+UaTb6+hocmT01GlrnYN6PAO FHbPU2WHwscacyblg8aJNy4bmTeU2SzQ5qFviROv1yyXH2zIq1Oj4dDNme+IKmayHHi4 jwf32KkPH6Enlae8u8F69d6skZPukKwbu8NW4SIQZ/8JJ/HBnZYif84MgQb2eeKGjxo4 SGyxs5cylHlG/08hND4J+p1ITxwelKks2LTvUc+NGhlo3K+VHe0NVjWq7zsmyE6PGox0 sacfQb0PC99rRwTHdnVIebuMOChK6dyW+54Co6PW5B4xlgESZqcRoAtZM8UsmcMW4KRK sydg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=sACPr0rKi8cX3KlKRVHiT5WKzJVsmN4Phr38A3lXp/c=; fh=7hMwKDf5yXJ1XkXZf4su34Aa0gum+SYy+XEpmb5G5aY=; b=yfWPsczWtF5NYj4OLaSuMOXfKhU3ouX0w7mND3kibnUyBL1r42DaVExagOAKfivL12 shCPWJq4Y29UXsEhEv//H1QWgY4vG9XfXo7AALP+epN9JdRoXDClUJsisiEgqz/gg2cX Fc4ukZMifJav6S7atbrKPTZkBu+zgY2EFTTM6QjzwzxoknOyPCE7/HXXyYwhqNG8oRUJ JO8JBwaRIzuGBz+6y95Bgaioq4agTYKLLA1FPduUZqljys/kzthI7qEnGwq40aisOGma EjUzGmGpjUXS9inHZppQkvWbpSsnohXpR9WY4Ov0aKFgpXxMNnRXFX3UD9aBZpTHu1Dq Re8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AMIAUpo0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w123-20020a636281000000b005b8ebaa2937si2465000pgb.47.2023.11.03.16.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 16:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AMIAUpo0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2188780859A4; Fri, 3 Nov 2023 16:54:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229476AbjKCXuj (ORCPT + 99 others); Fri, 3 Nov 2023 19:50:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbjKCXui (ORCPT ); Fri, 3 Nov 2023 19:50:38 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D90FD44; Fri, 3 Nov 2023 16:50:35 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4084095722aso19114325e9.1; Fri, 03 Nov 2023 16:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699055434; x=1699660234; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=sACPr0rKi8cX3KlKRVHiT5WKzJVsmN4Phr38A3lXp/c=; b=AMIAUpo0R5sa1oZlvUZMRjAl/GjX5nEppcH1B671I03X2TGPsMHzdiJ06v/JlGA3/4 CQ2cmwDv1dPxuOzuMK3J8q3bNvernmkB6f8tucwP0MzQWlxcBP6H0vTerlxMEDZV5bX8 xPVd2Zp6dtmZK2dNg/yhc+gIXL8GRnWsoKabz4ES2Avk08F5ZOylJ32Ucwao9ga9JE8G g1sswnOdiPy7N6C2CGscYyRV4jt9OIdg7DDYFf82ALOPF+lbZXGC9lu5NjUKT9WgTU+k uJaQaTgO7VKWbzWJcnSvcnXgxYqWoLugJpP8ayA4n15Fh0SOhTzq+C0OYc6++oZHVxAX Tbfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699055434; x=1699660234; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sACPr0rKi8cX3KlKRVHiT5WKzJVsmN4Phr38A3lXp/c=; b=ZMzHnqOWQBhBY7dsPGT/yVZ+0K9hTnCbStcczLRnSPTpYxhjK62Sfkp4SE2FXtEIlG yeiaUfbRyZOS2mue1ZB6UDjg1JsHQIefqc9u58wMNMMnwHvjaBNFHq7fx6LlNUQmDjs1 InVOkJu+QMDX8KesIscwkIM1tECnq5hImnjpfx375hVawWjfRhDEl2PvVRrmhvEq1xGI YcldMqpUfSW+DLKWamkIqJxCTpeRfAwTh62OZoNOxAvgmffMDKbk+zTbNH9oU98JYQTI zhXay6rcx/cGkb9l3inTiuxvPKqSHKUO3togIGM4NMnlDsDZYgsetiWNUWcdIQeDXZWr WmJQ== X-Gm-Message-State: AOJu0YwRLfd4BE/I+0Z9wAiTrQXZc8vVBjvYBZoRQqdp2R47VdlZxPU7 ej1ubAm3t47yWachtNJqWQ== X-Received: by 2002:a05:600c:4707:b0:408:5919:5f97 with SMTP id v7-20020a05600c470700b0040859195f97mr20266318wmo.25.1699055433652; Fri, 03 Nov 2023 16:50:33 -0700 (PDT) Received: from octinomon (202.51.199.146.dyn.plus.net. [146.199.51.202]) by smtp.gmail.com with ESMTPSA id h15-20020a05600c314f00b004094d4292aesm3916805wmo.18.2023.11.03.16.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 16:50:33 -0700 (PDT) Date: Fri, 3 Nov 2023 23:50:31 +0000 From: Jules Irenge 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 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 16:54:19 -0700 (PDT) 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 --- 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