Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5933825rwb; Wed, 7 Sep 2022 10:02:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR65TnF1zyVH7ZyHxY7fN0CisNLeOlwUMCSKZySJOgq/8LW8dKEwKib4S10B6FipAEanLP/B X-Received: by 2002:a05:6402:1e8d:b0:441:58db:b6a2 with SMTP id f13-20020a0564021e8d00b0044158dbb6a2mr3795947edf.277.1662570162918; Wed, 07 Sep 2022 10:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662570162; cv=none; d=google.com; s=arc-20160816; b=LQRLbjiCk6CirhmV7Nc1v47Vinlu6n9Ar2rXcx/6ep4sjbxAfUpJP+70Xyp7R7xPEi Ky33VK0q7wKr3rxaWSJ8+NbyZw5zrGdRbOtovk3azed4cSbLDpeMhJh5ExS18xPF8QeK P9TBtb8Sv+mIeWvSSxkp1KlZSG43dTTu84WGXOjP4QpEAqiq6kYljjJ9zVFvoM5MZCut RXal/AnShPgtzxvPPYi8aMVwOmGLS68EfnX6qLwAOtg/xYgFboH/LKVAstx5vydkuZxv +KBtOmjzAMvRxLm8BQvpLN2gntsQGHjBy0+Lab1GRsd6e9Sh1nH9Nt0+5Hrs/8lqppn/ nGTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=woXGkv6mUKxqQG1ji3pJ9j9rkFw7Ee7mhm34H9m/af0=; b=TBGxSItlBgbLLoY2E36fLdWynCWlfrT0qWpeq1q+6hY9wg8mPEvbTHBWlhEQN55ePb EjKAGP6qz0hdQ5gELZCS0M5jto1oO2YgE8fCy46jdTTgA13+yyGnuxeiEPsKU7pjDwoJ k43xpK8AGmJWUM3c+eX8oVTjBl5MLwCZ/J5PSOhW1OQrKR0fCkv83uln6eFRCdONnMCo BGWINyETeczINYYiAQaoW8Hr6ro4d2ak98EUYYgioGLH7msDqKLKTfjl7YQgs8GpQbJH wGJXrAX3UcpTAbx6DhQSy3BP3admFzX2ktKvz6OXOi1Xx8O+M7531g5zJxB+ICHRthn8 tc4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="J1m7zL/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a17090669ce00b0072a6d845d91si11902788ejs.159.2022.09.07.10.02.14; Wed, 07 Sep 2022 10:02:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="J1m7zL/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbiIGQ4r (ORCPT + 99 others); Wed, 7 Sep 2022 12:56:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230029AbiIGQ4b (ORCPT ); Wed, 7 Sep 2022 12:56:31 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28439B9F9B; Wed, 7 Sep 2022 09:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662569782; x=1694105782; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GVYgnFuqeArS+VSqk9IjZd0qcqmew4m2Zul+wVsLztM=; b=J1m7zL/O45mwQjDCwc/l3OvMc/wLGAwlKmr8yoENFVKDyickmYXQFsN4 RulrnW2hPXkym7Ws8nKRMyhBi/6yl4WzVHf6d8tOJEf6TutQ17o+btw5M ixuCNnJTItQlIQ8bqYh6TVVp2D5c0eDn00tzSFMfIOL41r5n9enUARGnt Fwe6jejCmyJdxa97wP8BRLjFR01ZFOAOPk6xuT/V6GiSI3HVnvAAQiCx+ bGR+NU1Wq+mMD1Amue1WbNw8IhMQh41nDi+/c2f/IkLK4DnhgUFzJ77Gi isonKWUOgqQUTV0avWywRtilhkA0zNwHc15IwGKLDZwZgPhHjDBH5yOeT g==; X-IronPort-AV: E=McAfee;i="6500,9779,10463"; a="298272029" X-IronPort-AV: E=Sophos;i="5.93,297,1654585200"; d="scan'208";a="298272029" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 09:46:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,297,1654585200"; d="scan'208";a="718212972" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 07 Sep 2022 09:46:03 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 27B0D57F; Wed, 7 Sep 2022 19:46:12 +0300 (EEST) From: Andy Shevchenko To: "Rafael J. Wysocki" , Andy Shevchenko , Wolfram Sang , Hans de Goede , 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 , Ard Biesheuvel , 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 , Mark Brown , Robert Moore , Wolfram Sang Subject: [PATCH v1 6/8] perf: qcom_l2_pmu: Refactor _UID handling to use acpi_dev_uid_to_integer() Date: Wed, 7 Sep 2022 19:46:04 +0300 Message-Id: <20220907164606.65742-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220907164606.65742-1-andriy.shevchenko@linux.intel.com> References: <20220907164606.65742-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- drivers/perf/qcom_l2_pmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c index 30234c261b05..aa68e230e020 100644 --- a/drivers/perf/qcom_l2_pmu.c +++ b/drivers/perf/qcom_l2_pmu.c @@ -843,13 +843,14 @@ static int l2_cache_pmu_probe_cluster(struct device *dev, void *data) 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(adev, &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