From patchwork Fri Oct 20 08:47:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 155889 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp913786vqb; Fri, 20 Oct 2023 01:48:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAzlx+YXAuqXpHCL2QuHL90rOW/9zJq5hHuGbRF3wjBKi/wTmLPZvovwYDl/o7NHqSl4LG X-Received: by 2002:a25:324b:0:b0:d9a:fd25:e3ef with SMTP id y72-20020a25324b000000b00d9afd25e3efmr999663yby.64.1697791738241; Fri, 20 Oct 2023 01:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697791738; cv=none; d=google.com; s=arc-20160816; b=OqegCiN6JBpdVT4rDsgWj4gPgfutaKTI7fNVB6RP9ufNZkNtdi1cRzN7wOwFofBeGz 2jhU106NalT6kAHZ/bemGdmBO27J8z5PMV+6rv94wD+zgSn7FEFwfx9Q0hSJtCn7M4bo 7MBPa9XawGpItFdRstjBubM+x3K1+Qfdxr4xJCBcnsWnRH4MagLPHdlmupvczSe3bFZL DF5R04oBLQPqonhlJEYGT6JSdoolfPqQF6Nw7AMcYMvj7+A1LDDJCFARzUZOpAT+lNUQ WMvdMLkJQvwTBeyPP+3V9t7cSmUE+HoaiY6QM2aXZ2bjanBp8as12WxXR23OQrg92TYu 3vfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=tZKLbE/+K46xILJucBdIAM8DSQmbZt8m1HII1Ja5WA0=; fh=WAU8dvHbCVEKt7PKP55MCP59DfghQ92mfS2Ma7uEses=; b=izznOvqKtf3awCc9qdZW7l1yErkFQ2aCbgVEYN3dVc2GeWdMLQQm8YbOwfFc96Spdh WvqxLWSxRMU1PYOUaTlw6dwkEhXfogRyMFOlljN3xAUXZ7EDYMoxegRvtSRntq+F8bfB ASMtThjb4U1u66+zhhq65rACXNiN3UkLHE3yyVttxiIgWuB1DsypltG6avWuShRHmKvq V0hEUEgrOxSVKJ0xXYAx6KkaOXj1/LyZU7i14ve2GGF790Xs2hRcWbYjXtprpjU6qmWq ToxXXC866wBRt6bjcYbnwLCLRIXuhEq7u9giDyAch6ws+QOugvcptoX0SgOgqk2GmKBB jF1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mFNw4VWF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f22-20020a631f16000000b00577f4d85fdbsi1447811pgf.548.2023.10.20.01.48.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 01:48:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mFNw4VWF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1546B83348BB; Fri, 20 Oct 2023 01:48:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376534AbjJTIsj (ORCPT + 25 others); Fri, 20 Oct 2023 04:48:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376572AbjJTIs3 (ORCPT ); Fri, 20 Oct 2023 04:48:29 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1900D55; Fri, 20 Oct 2023 01:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697791705; x=1729327705; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=pUffY3rZpA/Ma3FQvoHxe1V6N2z+ycJPoTJ6FPj6xDw=; b=mFNw4VWFCEKJxzxdn/4rHI+pg9qbQrr+bQ46f3focuCnMNRjviTjExV7 ZEBBgqxmuOppAVzSZ3r9W//s79JgHeyRWlH9tvg8FYxn+Ye8BtIpJnOTW qXV8iZOC+4c90XjdOQBftd0suwRqs05Dc7qkHlZj3nZsCSc2o03Zi52RF 4emVoD0luk2VR7IU6PE8FepiPndx15zxjGVqtfwiUcgJ9vxqvvRcfI2NV H503ny4lOVfWFLX7AHLhwdqUtbxCR4lT5vR4o4IF92+C34kk3NS5496TE QRLPj85d6cyQecYaOI2mvf5rm1ID5LQWFhE7LoRgstOfuUVBsz47zIIrD Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="450683685" X-IronPort-AV: E=Sophos;i="6.03,238,1694761200"; d="scan'208";a="450683685" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 01:48:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="873832206" X-IronPort-AV: E=Sophos;i="6.03,238,1694761200"; d="scan'208";a="873832206" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmsmga002.fm.intel.com with ESMTP; 20 Oct 2023 01:48:21 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v1 8/8] perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and _UID Date: Fri, 20 Oct 2023 14:17:32 +0530 Message-Id: <20231020084732.17130-9-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231020084732.17130-1-raag.jadav@intel.com> References: <20231020084732.17130-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Fri, 20 Oct 2023 01:48:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780263669498741343 X-GMAIL-MSGID: 1780263669498741343 Convert manual _UID references to use standard ACPI helpers. Signed-off-by: Raag Jadav --- drivers/perf/arm_cspmu/arm_cspmu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c index e2b7827c4563..f0e6d14281d6 100644 --- a/drivers/perf/arm_cspmu/arm_cspmu.c +++ b/drivers/perf/arm_cspmu/arm_cspmu.c @@ -1061,7 +1061,7 @@ static int arm_cspmu_request_irq(struct arm_cspmu *cspmu) static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid) { - u32 acpi_uid; + u64 acpi_uid; struct device *cpu_dev; struct acpi_device *acpi_dev; @@ -1071,10 +1071,8 @@ static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid) acpi_dev = ACPI_COMPANION(cpu_dev); while (acpi_dev) { - if (!strcmp(acpi_device_hid(acpi_dev), - ACPI_PROCESSOR_CONTAINER_HID) && - !kstrtouint(acpi_device_uid(acpi_dev), 0, &acpi_uid) && - acpi_uid == container_uid) + if (acpi_dev_hid_uid_match(acpi_dev, ACPI_PROCESSOR_CONTAINER_HID, NULL) && + !acpi_dev_uid_to_integer(acpi_dev, &acpi_uid) && acpi_uid == container_uid) return 0; acpi_dev = acpi_dev_parent(acpi_dev);