Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED616ECAAD8 for ; Tue, 13 Sep 2022 16:35:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/l58F/HNP9U/bcYjYc0c52Jli+3sq8c67YClUJiySVk=; b=FryvkJA87snKJK LCOn3hLCGova2P6D0dVLtpYMRyoAbggid4NnmrIuPnjpZCNsJBxVGRqqqTKcIGd1mijheLPvx/gpW IvWurI7/SV1RutyIfnuuAf18LEquvFflGPP4eTuyyFQjYdhC5i7SjwlrOunsAAknwpg+QirejltdQ NLLUcuz2VoNNBJCEAIWlg9bx/eMmZTkxEZdtf5DL1SdBh7GKFn7oD//eM5rL69yZYBI+U5aPHylxf mayOkmfDqNnBJYztQqkczK2/NqJn9tkh9i9qDZg/USsKgfNuHOOeicRphAYzFLAjjCCjNzCRhSfas NBsOgjm4qewv4BY//4oQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oY8s0-00DOwq-At; Tue, 13 Sep 2022 16:34:45 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oY8q1-00DN8h-JI for linux-arm-kernel@lists.infradead.org; Tue, 13 Sep 2022 16:32:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663086761; x=1694622761; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NzmE1/IO0VatkJS0QWAbb13XUkBx68v4n4aNQ7ngE20=; b=m4+A3LwaZ9u+wuRTiPVthEpggVDsmjjygLm2t/ZlI0zu01iFxOxBXA3z fPsdBmJ6hQ6L6weVCfOoaEo3MiVkpdLQqz2vRNsrH+B3VzA4yi8wdtKga sGDNIBnuBis4/fPGHiR8+67fjRHS/SOZz08r1m+gz1y0geoGW+ICHNxI4 Wy7Kaun5x7LzmKN7P0LlGtJFKcbQviHKxmTlW9eyBS5BQrd9KLmX4bHkH dlnvT6xhfsOn6Tzvf+o1gtV4siHWX0Y3rpwRMUWAZC5Vs7zyznw8YQ1AY 5tVn5ABf4ZSLS4JCyw91DhR/XCFd+tNNRmu8SY9wMuHQ5vBWxidXMWp7S g==; X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="299523977" X-IronPort-AV: E=Sophos;i="5.93,313,1654585200"; d="scan'208";a="299523977" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 09:31:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,313,1654585200"; d="scan'208";a="861610561" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 13 Sep 2022 09:31:39 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 798A757F; Tue, 13 Sep 2022 19:31:49 +0300 (EEST) From: Andy Shevchenko To: "Rafael J. Wysocki" , Andy Shevchenko , Hans de Goede , Ard Biesheuvel , Wolfram Sang , Mark Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, devel@acpica.org Cc: "Rafael J. Wysocki" , Len Brown , Elie Morisse , Nehal Shah , Shyam Sundar S K , Khalil Blaiech , Andy Gross , Bjorn Andersson , Konrad Dybcio , Will Deacon , Mark Rutland , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Robert Moore Subject: [PATCH v3 6/8] perf: qcom_l2_pmu: Refactor _UID handling to use acpi_dev_uid_to_integer() Date: Tue, 13 Sep 2022 19:31:45 +0300 Message-Id: <20220913163147.24258-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220913163147.24258-1-andriy.shevchenko@linux.intel.com> References: <20220913163147.24258-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220913_093241_702555_8963A2DC X-CRM114-Status: GOOD ( 14.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ACPI utils provide acpi_dev_uid_to_integer() helper to extract _UID as an integer. Use it instead of custom approach. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede --- drivers/perf/qcom_l2_pmu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c index 30234c261b05..aaca6db7d8f6 100644 --- a/drivers/perf/qcom_l2_pmu.c +++ b/drivers/perf/qcom_l2_pmu.c @@ -840,16 +840,16 @@ static int l2_cache_pmu_probe_cluster(struct device *dev, void *data) { struct platform_device *pdev = to_platform_device(dev->parent); struct platform_device *sdev = to_platform_device(dev); - struct acpi_device *adev = ACPI_COMPANION(dev); struct l2cache_pmu *l2cache_pmu = data; struct cluster_pmu *cluster; - unsigned long fw_cluster_id; + u64 fw_cluster_id; int err; int irq; - if (!adev || kstrtoul(adev->pnp.unique_id, 10, &fw_cluster_id) < 0) { + err = acpi_dev_uid_to_integer(ACPI_COMPANION(dev), &fw_cluster_id); + if (err) { dev_err(&pdev->dev, "unable to read ACPI uid\n"); - return -ENODEV; + return err; } cluster = devm_kzalloc(&pdev->dev, sizeof(*cluster), GFP_KERNEL); @@ -879,7 +879,7 @@ static int l2_cache_pmu_probe_cluster(struct device *dev, void *data) } dev_info(&pdev->dev, - "Registered L2 cache PMU cluster %ld\n", fw_cluster_id); + "Registered L2 cache PMU cluster %lld\n", fw_cluster_id); spin_lock_init(&cluster->pmu_lock); -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel