From patchwork Mon Oct 23 05:35:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 156671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1090465vqx; Sun, 22 Oct 2023 22:37:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGq1N/ICX78qm6nKAA/hUOOai4/1YSDdppeDk7jyeoXWIVMVH9aXNtRNrPH5GHVUIiNKsC1 X-Received: by 2002:a05:6a00:812:b0:6b5:6c95:4671 with SMTP id m18-20020a056a00081200b006b56c954671mr10019816pfk.34.1698039436536; Sun, 22 Oct 2023 22:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698039436; cv=none; d=google.com; s=arc-20160816; b=Zsuq9VcO9iGOhbJKzgJJOYZovnmK1ElK6JLtxrXxXK/UlP9rlcvEmGZh7Ygcv5TuzA 1RvytqHeQbwxyFF98ZXv+nkKKZeMZmhuR4R0iwHJF9ZlxOCSCmjP4y+pwv5TDnzsG6Dp xfxgmqudAjyOB3tFbpT0f8aKVnaBxQZLWLNCunaxihi+2Ir2kaOmqt1R9Od2CtlzgPdc uKv/+an1oqGaWoU3JAmvLbK44LfPYUHh3ZlA3WVzUj69gEJbrQ/BQOkERR1EMxkvgUgd Vl7rFyjnJZPrxnw1o68tP7Ta0j2TxAYuS/KCIOr5bOxnWlM+BpslkJvHvDLpc+ABcyzi BRiw== 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=BipjbGvEMxr0UGYoY5tgoOfYeRH4lM7X8HJ4Q3ZbXdU=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=JAcirhogevP7ILy5Fi0GM0hIEMfrw2Yv27kBmwB+PCEYD7yAkwSohyxcJgQBeWEd1t gK+9JamWcnI858mfmbaYfKBm5NvosBqZpKTZqPNinRyiW8jNJB4EZdXcsUuWD6h5i4dD 05SunUFxuAFfyx05sPdN+NbqzXZ6KVXwqxowD+I726rPNdtKBTg8VC1l2P/+arQ5X15X 1xKHMQSXzrKuFR72/DtheZvfTFUY97ChJRHOrmHn+hkH0NByqGNK2YgruvafY9ee2JGS OED2O/iDB1ydYSB7ytt1TZHyHBaB4OKcmth1GDba/UnWljrUnjYOTOHP2RefZsux9JpP /9ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=limts0eB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id bx29-20020a056a02051d00b0055793097dbesi6451487pgb.469.2023.10.22.22.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 22:37:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=limts0eB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 27B26805E56B; Sun, 22 Oct 2023 22:37:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233341AbjJWFgr (ORCPT + 26 others); Mon, 23 Oct 2023 01:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbjJWFgb (ORCPT ); Mon, 23 Oct 2023 01:36:31 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27EB1E9; Sun, 22 Oct 2023 22:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698039390; x=1729575390; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=3yrAjMBirTIUAhTanyYbEMtK/J+a0HZi5Xr6F7vjCTw=; b=limts0eBIeR5M9GBaWRZJWPuasKW9qBDxQ2p566yP4Yty4lsBbuYtd0K 8b5ra+0vpIcvy4C0L8wBM2g4tQxqFnubUcQx+QmuNMHG8t0taUzkUHniT QYbmo08sYHcofYXGUb7grwPFres+uwHEy6UvwlL6u2vwbgj5JpndLtD1g T21+1BanJ7OKzDnFkISn1bAKKNvL4avXBWnSxwWz5ayhG3Z6QnRQSJgU6 3shnK7Tf6pjL9QHkB7+yfRWBCtZTcKxezwGXtio4mmaDd4SiQ5LvO496o ldFZOTayNOqVdoo+3zlIT6GH0tgUxb2uakzvh9boO5gDhqhDUjR1S4jl9 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="417905465" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="417905465" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 22:36:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="734556713" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="734556713" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga006.jf.intel.com with ESMTP; 22 Oct 2023 22:36:24 -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, Jonathan.Cameron@Huawei.com 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 v2 6/6] perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and _UID Date: Mon, 23 Oct 2023 11:05:30 +0530 Message-Id: <20231023053530.5525-7-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231023053530.5525-1-raag.jadav@intel.com> References: <20231023053530.5525-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 pete.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 (pete.vger.email [0.0.0.0]); Sun, 22 Oct 2023 22:37:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780523400081132733 X-GMAIL-MSGID: 1780523400081132733 Convert manual _UID references to use the 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);