From patchwork Tue Oct 24 06:20:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 157250 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1747700vqx; Mon, 23 Oct 2023 23:21:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/4ZE+XCcZzOWE2d3OJAwFFEmV9ZzT9MbWlBy/VPwSAGuJW5V3jhZ54cn6DuhHxYBGXeHd X-Received: by 2002:a05:6808:157:b0:39c:59e2:dd79 with SMTP id h23-20020a056808015700b0039c59e2dd79mr13070500oie.36.1698128504104; Mon, 23 Oct 2023 23:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698128504; cv=none; d=google.com; s=arc-20160816; b=pgruFwyWOQbGltBMyu9tQi/UkRHotbC8vb+4FMc2tPsi/vjv1Eua90WUwY0BasohLL P9Q718NxdAXrioOY2c41w07cz9ETgxZnNrF5PVDeUJqgf65uFrf9pZ5nczImalieI9S6 I0p7z+s00rMAji//JiFBRPI4u8CP1z7w9ku1sDisJ+gMk+pS21uyuetKjfqdeguWeXK7 XsLFL6cm1BxRwC7v5R7LipJpOSoWcjJ3h1ngoj5jfjrDlpzEd68IZWs9KWMEI3yWmhiB C181tHXHhIxHfdUEhp37LsjatqhKUAIiNcvcrFAhyhCTdMSQtzvXCfqtbAoWCk05H29A /VDQ== 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=HQbFwHeuoy5SxfqFEZlSbpscPeLRgVAQ0ugd4AMY3VxUZzMhbtIfixW0XEqAdhgrOb QRYMbiqslynmGySbGcyWqDFb2Ts6pu9AafgxEQy9LZfBry0bYDfgw99rOuDjANdCK9zk zneTzkDCU6bG+mEefApfwQDc8VsgpNVvlwsLJ/EzT/TBI41vp8wf2OGPLEI82AxVOAza WcAcCYKolEUKkF/ONUzFnoOevFHyxQM25A/Pgnl09IV18CB7r7gYixwEShTsFfUizA9V O3nN0wz2JpXkD8WVccjc1AbTm90eL7erPJbN+BzhSynQGWWO3eMcP4lAojVCNmqRWO1e GvuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=miF0FbPh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c15-20020a63da0f000000b005a0737404a7si8217867pgh.258.2023.10.23.23.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 23:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=miF0FbPh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 0F447807405C; Mon, 23 Oct 2023 23:21:42 -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 S232743AbjJXGVe (ORCPT + 27 others); Tue, 24 Oct 2023 02:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232753AbjJXGVT (ORCPT ); Tue, 24 Oct 2023 02:21:19 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EDEC198D; Mon, 23 Oct 2023 23:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698128468; x=1729664468; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=3yrAjMBirTIUAhTanyYbEMtK/J+a0HZi5Xr6F7vjCTw=; b=miF0FbPhdv5nYzlLy0kqL4U9Ht1eIN9TUbxeWYzWUAj8NLBbubmAtYd0 tqdC7qcyQyF0PKiOECZWaqWEYhGAFdcFMDv9jvX11U2723r87V1XM+QYR yRPjVHL/ifs2bQ5y1p926bgZyC8G6tX95D2SRf2+NK38c+5cnvXkSJ+2A JGRTG3blE1fgLt8G8BG7gTDYnVF3znaL7kNHtJPjOfHRVFoS5uq2cFBJx ABUi4KN7fAdQelCFfZN0azsvBgDjOg3NnlyG7CUvF74lWlMkrXO6RYDQY YJsW3FzXaO4O1BlYxn2WSm8rhMC81azS9rExPUYhWWV8OF14QmIBj0aiX w==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="386806618" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="386806618" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 23:21:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="751891479" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="751891479" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga007.jf.intel.com with ESMTP; 23 Oct 2023 23:21:03 -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 v3 6/6] perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and _UID Date: Tue, 24 Oct 2023 11:50:18 +0530 Message-Id: <20231024062018.23839-7-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231024062018.23839-1-raag.jadav@intel.com> References: <20231024062018.23839-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 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]); Mon, 23 Oct 2023 23:21:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780616794341085294 X-GMAIL-MSGID: 1780616794341085294 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);