From mboxrd@z Thu Jan 1 00:00:00 1970 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 27C03C54EE9 for ; Thu, 8 Sep 2022 13:33:35 +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=6InR3W5f+gPSy1jmfz7MeDjBSd7UCgdwn6+9VychKUM=; b=Poi36avB7jfTqY WruOcWYLrPA464qkvqzmw6jSgOHA7Er+/Fdrs2gj58KWiI/LRCin7s0F1zl2g7v1IaURTJwr94gt3 T3tVHemwt3ZL7EsgmgoXwfx9agVcBX+4vrStlC9et7yb9fT8IRdlZ7dVclYZw+o/pIz8WIyltUSCf BV/r26ijT079SLBHfrCI//R+JPC+a5WrOTTSYEdCbElJhJyJTaBMpuCmcE5OdgmGYLTYQQ6ttHCFU 40UYykA6p/fDUu6Kb7ISKM+kN/mrDrSMbH0e8MbTbEuJGbNgzbkV7xEoWqfPyXHZUjtbQCE6Q0usx FEuhlNGzocs4NHVzVUhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWHdc-003t7y-S5; Thu, 08 Sep 2022 13:32:13 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWHaw-003qXV-Lt for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2022 13:29:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662643766; x=1694179766; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=J12ArvUpT0DBpVB2Z6wl3Lorr8ZN6snQKzGYUIXMmcc=; b=EpXWUaTR+UWNUwmf6OfaVKwi9NCc/+Ud2Th0EGdSYopcPUYvNYHJABbl MZ190b/j73EtOz11AySm6QWLawY5Lw84LA+Q4bU9hLSu2z/xHA50bSgmE L16EOpL04QVbWqB6uxfDlsiKzi7JwtaUwzTzHAOwE72EF/rWxV8Sh+LdK lkU6CC8j2ppfMhLtTIEZJ9ebl7S0Xl85eOjAiE7op/sLECr6GQNrIOEva G+oQ/d1UWn+Y8mdK/p8yN+Vjwiy2Gmy3vraOw2OKBjZ6aVGlHBBN5RMaA cFCUA8yItK4sqm0eXXnQ3t4duNN3n0cW5epce+AxVy8Tgr9QRGzlwO2sz g==; X-IronPort-AV: E=McAfee;i="6500,9779,10464"; a="295900115" X-IronPort-AV: E=Sophos;i="5.93,300,1654585200"; d="scan'208";a="295900115" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2022 06:29:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,300,1654585200"; d="scan'208";a="704006402" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 08 Sep 2022 06:29:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 055595E4; Thu, 8 Sep 2022 16:29:12 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Hans de Goede , "Rafael J. Wysocki" , Ard Biesheuvel , 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 , Wolfram Sang Subject: [PATCH v2 6/8] perf: qcom_l2_pmu: Refactor _UID handling to use acpi_dev_uid_to_integer() Date: Thu, 8 Sep 2022 16:29:08 +0300 Message-Id: <20220908132910.62122-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220908132910.62122-1-andriy.shevchenko@linux.intel.com> References: <20220908132910.62122-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-20220908_062926_787055_BF0C4A47 X-CRM114-Status: GOOD ( 15.23 ) 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c index 30234c261b05..ad4a41e1287f 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); -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel