From patchwork Wed Jul 31 08:32:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dhananjay Ugwekar X-Patchwork-Id: 13748260 X-Patchwork-Delegate: mario.limonciello@amd.com Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2075.outbound.protection.outlook.com [40.107.237.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 255DE1798C; Wed, 31 Jul 2024 08:32:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.75 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722414747; cv=fail; b=QOiewG6WiPO+yRyHf70P6kQBiJtMdMdARsrOwezusTR6xwSAy5oJKBn/AuN1rw6ysv5UwSY/BaVCXV/EZurjRr2VYFiX/UVZDY1ejgiLc9qY1sFJ+3H1xSJBUFNfNhyCU/BVBYnW+cEoou5qbQZ3Q+ZD600vDLMKL68Eu5Qd+wc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722414747; c=relaxed/simple; bh=memRygpI4o6FpDKM3ZAwzctqBhaSmnyBAlZYQz6TVSg=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=k6CBXLQBaTtEKE+CghLVgYdtJgu+KDgCvmJqRR6nyCO1h2/gNiAF/x7q0kvqLTxhMaRcvVpGeZCjw9mRH/iBCjnCTKa0DogbJMJFVIznEuqXsuqRBext70h1RUk6Fj7VtQaAqiskCCuC+7Ke3Llr+N2gEhmFY3L3CZ5Gp9O8IKg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=krO5nCkM; arc=fail smtp.client-ip=40.107.237.75 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="krO5nCkM" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CKsGoPadrjwzAVj0LNn6vbBl3DfCaY9FqelYDR8HYJH3P/lz/ak6Oqlsd57qmy+hgtZME+SjSilymlCVDNBp3qA07WqcM2scqZn1kC6ncQIncg7OedZE84Il0AROXRIzbXK27RNAmh/34IH8kgM8vkXZRaffWOXLhPGi/FdjyojpJAT1Y4BvuRJHwgATxbYxObv5Lu2dF0qUCqWGocoAlgDOvTzHf5AQsBglJuAL98DMdrDYFPxqM9tCe6MNI6uOSpZ1l6JCCJzb3SLLG+oTVAo3O9GyPf5RteuGdspeayZYlRwFeZu8vouldn3SWQpnwtUauzgDy0hn8A9wVIDtxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8QQ6397E9YST7lI/+iZs8wNeKZMHfz9VvuBA640/rAE=; b=Ln6eyGOgSSKSyMSq/naY/gh8fmodMJ042+k4QOAOAzxdXGP1pof9W1Y5NihUGKiZo3eMmuCWBjFw1CrVFNvux+dbn8lq6JCfHSm0dBVA2mKLt0n7gbWOdddK/qGHMOOr4igpKTKRb4Q4qXtoGJ9CHnkSo4fuHzic+KMFTyXknYwpjGU6EhGp55uLaka1dzvIU0cVaNQODeZPkjOv41CFp7EMD2SRcfvTVRPJYZHX2DkyzCWx0tKCcgDGrojItHmInKK80nNdy7MCvgCcNNDqfuLIz/3847rw3SBgSyykza5X+Mg3DrltG8W0ZJUy2DaH6EHDw6lbSgbznUoB59a+IA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8QQ6397E9YST7lI/+iZs8wNeKZMHfz9VvuBA640/rAE=; b=krO5nCkM71mKbb9toVXBoyIBD8kpbj9+SairRPTNkiCNvfYEA7dmjU4rTQdCFZry9QKdlwYr4JrCdH/i5U97bviOzc1f6irU3Z0eOrdy78WSvhvSu50MVVgH7atBkgZSf9q2z5WUkTqNAeAIPRHUOVeMpAEdwH7D5IXqQwTu6r0= Received: from PH7PR10CA0011.namprd10.prod.outlook.com (2603:10b6:510:23d::12) by CH3PR12MB8877.namprd12.prod.outlook.com (2603:10b6:610:170::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Wed, 31 Jul 2024 08:32:20 +0000 Received: from SN1PEPF00036F3D.namprd05.prod.outlook.com (2603:10b6:510:23d:cafe::b) by PH7PR10CA0011.outlook.office365.com (2603:10b6:510:23d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.35 via Frontend Transport; Wed, 31 Jul 2024 08:32:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF00036F3D.mail.protection.outlook.com (10.167.248.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 08:32:20 +0000 Received: from shatadru.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 31 Jul 2024 03:32:16 -0500 From: Dhananjay Ugwekar To: , , , , , CC: , , "Dhananjay Ugwekar" Subject: [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put() Date: Wed, 31 Jul 2024 08:32:00 +0000 Message-ID: <20240731083200.169985-1-Dhananjay.Ugwekar@amd.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00036F3D:EE_|CH3PR12MB8877:EE_ X-MS-Office365-Filtering-Correlation-Id: 88af0f00-1ff0-43de-576e-08dcb13b4b5f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: MnUOSCeIxxCzIjUjNzyb22SJ2DnTsTAat4NkzHogBGip1qchcz9BfiLBjA2GCPG4Pg5DdYPoWpQsLlesWmGKybdBRGyXhWTFp6G+uqIgJdkg4BRCi+gZ11COp8YW1eaBpop221hLAoa94P/ODbs1H3JLmUS9f12Enq5DnOVuyHu0DWmQO8oFjt76DWuDt7236dBHs4L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0WPEM/MtzY60ecU1cmX2S/N906evsOSg043qiX//IJGGFIfoxwdlMPa7nQqtnwC/6N1rTJGVhUzrlsoNL8FI2jnRYeXb1PnVtk8ooCQU5O462F0sMCutOs34u61AkLZBWjMJuSd4/6/ACqtCI4kKaSqPNCboRYAGzNFfpB3Luom8IfxI3kFR8BkFABDPY4aGddhqTjwmc6 X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 08:32:20.4712 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88af0f00-1ff0-43de-576e-08dcb13b4b5f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00036F3D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8877 Fix the reference counting of cpufreq_policy object in amd_pstate_update() function by adding the missing cpufreq_cpu_put(). Signed-off-by: Dhananjay Ugwekar Reviewed-by: Perry Yuan --- drivers/cpufreq/amd-pstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 804fab4ebb26..36edae40db1a 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -560,6 +560,8 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, amd_pstate_update_perf(cpudata, min_perf, des_perf, max_perf, fast_switch); + + cpufreq_cpu_put(policy); } static int amd_pstate_verify(struct cpufreq_policy_data *policy)