From patchwork Thu Nov 23 10:06:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 168849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp338629vqx; Thu, 23 Nov 2023 02:08:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZ7l1Ghx6io26rI7dXHx0yCFvr8C8gz+HoLIenOOd2iqduDrAzIsVfrmA+qua4lIpvAoo4 X-Received: by 2002:a17:902:c408:b0:1cf:7911:4619 with SMTP id k8-20020a170902c40800b001cf79114619mr6431199plk.49.1700734136833; Thu, 23 Nov 2023 02:08:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700734136; cv=none; d=google.com; s=arc-20160816; b=HjnH3HKyeLrvFf5oicSW7i6Q5a+z7DTVTkHee9AvqI5MnycRQAZEmJFkfaGVOALIaZ 5uf4aFKlTZBDD1hSXHiJRveG8klOU8L2B8/rc7Q57F5NbEI0rIOHHVLNvnKt1wNKjv4F IWb1+fKitQ14U0s5MYQlrXuKIqk90OxlxjXuwH5ecMQNd2owJLyAzMdUQaH3sAlWT8IW OCEyA4i6VwYCcqhjU4/OTED7PAyJupCVwk23vWo6FXtyOrROikTl527aGYctfqrdtoDc gZIlp3QkwDY8fynSn/NGEVl0JfAE13qip2pvAu7ShAAFHRx5rJdojNStGvVsq5mpDsRN EjnQ== 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=QjTjnPHdHtVH1dC7lHvGdGK387/jBH30+7TqV7VysKg=; fh=LrjGCQr9k+7CYyd6XEdJgJkCFIUW/cPwqK3zW8PbdHI=; b=FN5CY0g0oifJyDMcRPH/1TRm3Q/19Xdl0qlHelcw8nGcpVPWzKCd6zdo+1qXcHOt1N O5149M7mdOKU3jCFQrjUXT4QCF2Db/64Jz1d/O1RxyD5WQJIIXhTBw40pT34/aYFrCPb PjcLV1Cc9rfDChOF8NTOG2VdzuQoH51MrwINJd5vilTCjo97bK2FVWMWCdK6gBm9izVL KIPwpLKPgszKIb8GcnM9nhTWbp44rN+6N+lRuLPK9m4cenoY1JiZnhBicfTcWwssfQwf 3QK0z0gHz9DsXv8kEBcMk7PMePLw1rtXHtVpmu4ZnZa+IrPYJDzH1FWWgZyGSmxWpQfa zItg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fySHu95r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id j4-20020a170902690400b001ce5fce5328si840952plk.99.2023.11.23.02.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 02:08:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fySHu95r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 6A0208098439; Thu, 23 Nov 2023 02:08:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344342AbjKWKH7 (ORCPT + 99 others); Thu, 23 Nov 2023 05:07:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235351AbjKWKHY (ORCPT ); Thu, 23 Nov 2023 05:07:24 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0956D10EB; Thu, 23 Nov 2023 02:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700734051; x=1732270051; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=eGrPJB71BQqPQgzBxdkMDsK/ebN3t2PqlY8XYy9ELos=; b=fySHu95rX65pKTF/wNvbOZ170G5WL0GKZQKbQWukKyWG2dbMqd8TxFPR gPQ2FtFwLy1Qmn0OkciwDjwcCQXBdpdZ7zofhQFLJSad9WvS+YdeG7IPp KCXTH7b32BSbiejOu2MQREjp9eLz+Q4yO7Gh0r7PtJdJT+LIhoPyYVWEQ 8GVAb9Oiuuikd9Xcdye/JbXotxWItfhbhXPW9eVsQDmoDtxC6E632AiKg gnezJnIRBTrjhv58ASiAis4Gl95xGSOV71xgOdDaFmO772acVp1lGiVhN UttWsbHr3ls06V8NKSaIYrjCQtrid5/s9Qwuw1dzU5t/VvGuPieGSJG86 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="456576447" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="456576447" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 02:07:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="767160544" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="767160544" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga002.jf.intel.com with ESMTP; 23 Nov 2023 02:07:26 -0800 From: Raag Jadav To: mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, rafael@kernel.org, lenb@kernel.org, robert.moore@intel.com, ardb@kernel.org, will@kernel.org, mark.rutland@arm.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 5/5] perf: arm_cspmu: drop redundant acpi_dev_uid_to_integer() Date: Thu, 23 Nov 2023 15:36:17 +0530 Message-Id: <20231123100617.28020-6-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231123100617.28020-1-raag.jadav@intel.com> References: <20231123100617.28020-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,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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 23 Nov 2023 02:08:16 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783348997833838642 X-GMAIL-MSGID: 1783348997833838642 Now that we have _UID matching support for integer types, we can use acpi_dev_hid_uid_match() for it. Signed-off-by: Raag Jadav Acked-by: Will Deacon --- drivers/perf/arm_cspmu/arm_cspmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c index 2cc35dded007..50b89b989ce7 100644 --- a/drivers/perf/arm_cspmu/arm_cspmu.c +++ b/drivers/perf/arm_cspmu/arm_cspmu.c @@ -1108,7 +1108,6 @@ static int arm_cspmu_request_irq(struct arm_cspmu *cspmu) static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid) { - u64 acpi_uid; struct device *cpu_dev; struct acpi_device *acpi_dev; @@ -1118,8 +1117,7 @@ static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid) acpi_dev = ACPI_COMPANION(cpu_dev); while (acpi_dev) { - 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) + if (acpi_dev_hid_uid_match(acpi_dev, ACPI_PROCESSOR_CONTAINER_HID, container_uid)) return 0; acpi_dev = acpi_dev_parent(acpi_dev);