From patchwork Mon Jun 17 07:28:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riwen Lu X-Patchwork-Id: 13700274 X-Patchwork-Delegate: viresh.linux@gmail.com Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2043.outbound.protection.outlook.com [40.92.98.43]) (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 B594D18C320; Mon, 17 Jun 2024 07:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.98.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609301; cv=fail; b=P14ZnLq/eFO8C1fciYowfbxQt7QvGEOZ1zjRADk3yR1/l1q0b/ei235Tuj5uqtczqfn3vU1GSC7LCSSFbdzlUTszgZOuBPeM+cFuTu3DYGLKcHDn6Vz4ITeQesXCpx9UfCu61xbLACXLIVCOi1GmxcbVwTLw0ifJmWs6ECQH8r0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609301; c=relaxed/simple; bh=OFJeS/PP8zKTuCZvwf6nMKmxU3pRGd0lVmckNBH0Rcs=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=H91tftwGz/csFzRUCU8NmY5+oE+Z7ja7s90qlWWCX/rWqRULbn7ZmBuf6bcweTBMjwL9fURaok1qkFo76beK16ed4NRj4PUzuEgk6X0JFxtabR9GEiaq3yJ/yHzuW1BnlL6mVtZiUAjZYMC3FjxkoUCxcEOsBCQfr2Hg25ZCeC0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hotmail.com; spf=pass smtp.mailfrom=hotmail.com; dkim=pass (2048-bit key) header.d=hotmail.com header.i=@hotmail.com header.b=tXw8S+bD; arc=fail smtp.client-ip=40.92.98.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hotmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hotmail.com header.i=@hotmail.com header.b="tXw8S+bD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ADsKOcLpiMVFfuuUDiVZZ28ntwDbgRyKdFATWTo8621OV4KzD/IDP7+pLjSKBQyqU03xcEhN9v2dMVhE14EerVUFSV66dH7nuSC4CUsZKMTQkW4KwFONL83dZpx1qN4QaMOrkFzhNzyLFZbatLrUf3GWWT3lxzku/Q4RY+r/B9rm4CjuNAshV1bFxoBCiaEQPYyd+Hnx64JKfgVrHL7eFeKMKWHrvrMAH6xaNiq+L9TlA8lh84x3jdhrlzsCa2LawghpnJqbybp9VpwvEM2s90Qqw/bx3Hot5vg0tr1MWC2A9Ns299jTaniyzKcoLyJG4qaB1IjBY6NBFSbwFRMipg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=/kHmj+FF9DMq8xevOJbv/EWOkP8C4vSDTmV+2ZqxW84=; b=Y4WFJRRHm+9JhxkGpt4RehdGnaAH0WqvRo/UakYTdWxGY/lheZjMIW84x8AIPgtSoPKrXIChjszLJBRGC6Xhs3snmed+tO384E7Hz9hwXjeKpehcqvkL9X9p1tu9Y0kJJbrdfA3u+yff8MH4dBIY6rwHahO+6uVfEyANaimCmt1rDVczZDezqgSQkUjZf/DUHt+GNVPgsurWIV3cecVGmdQlb/1GGwbl9lNMjUGphMV30nYqh0F5dfcLYgMOkg9rnj9kFJv1MW1W8Lr02WYHbNviAQ4PHI26oqqD8wOR2PzQa5Lu4uKIiOpXm1q54Hj1zMSuLDdrIsp4JPEBlB93Zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/kHmj+FF9DMq8xevOJbv/EWOkP8C4vSDTmV+2ZqxW84=; b=tXw8S+bDklSYUgk64FKtV6yhWlf2Qom2eFUO8Pq0qWl+uQeXoXBEi3Qbf2HA0esz9TmzqLC7flgLtmUhmQQ7QZ9alE5awsy9lSEbcuOTUV+N6DqQTQTNaq0sohf/kHjwmUNu/OApsgtHmWJM1dxGlM2FTXqdACSLbIBhF9INamBXjFTYVzIuf7tInvIB/SaQ9+QCsHsvxy+uvDBvbhp3geJDmybPNBxP29n0uGyVeb0IcpSbHZw2JhhYEv+fLY6ERMZDhEA/3ApUm0u2IgIMkoy8rgcJba/s3Yg0BwN0JM7zWR9UEJU+9XLczZ4Umq8Y+JQHEleZ0jpt2jva7YJzXA== Received: from OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:1f1::11) by OSZP286MB2442.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:15d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:28:17 +0000 Received: from OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM ([fe80::1167:655a:7fa5:5cef]) by OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM ([fe80::1167:655a:7fa5:5cef%4]) with mapi id 15.20.7677.030; Mon, 17 Jun 2024 07:28:17 +0000 From: Riwen Lu To: rafael@kernel.org, viresh.kumar@linaro.org Cc: ionela.voinescu@arm.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Riwen Lu Subject: [PATCH v1] cpufreq/cppc: Remove desired_perf temporary variable Date: Mon, 17 Jun 2024 15:28:05 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 X-TMN: [qcsB02YZagS/W9WSDM8XD1z1JRQOzLu4] X-ClientProxiedBy: SG2PR04CA0200.apcprd04.prod.outlook.com (2603:1096:4:187::15) To OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:1f1::11) X-Microsoft-Original-Message-ID: <20240617072805.19407-1-luriwen@hotmail.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3P286MB2490:EE_|OSZP286MB2442:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d5486f2-8173-4c06-bd18-08dc8e9f0e0e X-Microsoft-Antispam: BCL:0;ARA:14566002|461199025|3412199022|440099025; X-Microsoft-Antispam-Message-Info: L8BjiQKKg9bfEf7se3a2ANiGcvMdazBynqTGWw3Ck5AAhOt+5m2Cq4EyvnKXcjNvwHQnFPX3ipQvvterziHu1Ihrg9ZLU8EUrvAln1u8nqBNmJtae7ZH+9n0RW7uPBw/5N52jtTXRB1avBfipKmO/+8N71wlegf+YBcAtR6qA/pWIejyZhH/eAGVpSxzYfNKAEyCzJnHUV8xvD0Pa6NNOR+urC+eOzG50c5zdwzkGULY+zwlRNeoDMbRM306jbXkfvE1VJLkqOLZYl0Nl67qgkUxc9Wy0LWeG7bddph8D/EPIJUZ9jwz4UgOqScaV+bAe8c4F5u1yj6yBXfr7QeqEmcH4/jidZooD8Rm37bJICKVsSBRzpZo05ARQW3WH4na8XXp1H+LN8zW7XGS0MeXi+rfIhxnzBeAsyid70Ila9m+9X9j86igAV5l1TkwNcZwxa2ZzbNUpZgqos937k2QKfjguIN8NUX56xmnp4MDkGf4YWLRkxRsgzIwyeVtuJqE8GP61/uuktsKx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q7ikT5G2IIowdGXNCe5i8t2ld0C1iwgcXMuZsEaA6iiHaWayppItZXKgQOC2ATDjJl33zUjgxL8dmdxvkFEqSjCkHKKBB1E4q5hpUVJ9a1ntFf9K/wLO3JkGGuGDtEV+oYq3qfDftuCldougAwH82/aN81KdTke8IoBLStEnxW0Fwu478L1RlAMNbnCzloheBuk23B1lyOhBjnw6dbWtq69YqxNburQa3+yjrM72qh++eeOrADb9TIHHZpFpuxKLp15RDtCbiH/GhHB1TvIvODRnhLk= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-05f45.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 5d5486f2-8173-4c06-bd18-08dc8e9f0e0e X-MS-Exchange-CrossTenant-AuthSource: OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:28:16.9861 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZP286MB2442 From: Riwen Lu There's no need of the desired_perf temporary variable in cppc_cpufreq_fast_switch(), remove it to simplify code. Signed-off-by: Riwen Lu --- drivers/cpufreq/cppc_cpufreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index 9095fd5f8c2d..9a5af756e447 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c @@ -314,11 +314,10 @@ static unsigned int cppc_cpufreq_fast_switch(struct cpufreq_policy *policy, { struct cppc_cpudata *cpu_data = policy->driver_data; unsigned int cpu = policy->cpu; - u32 desired_perf; int ret; - desired_perf = cppc_khz_to_perf(&cpu_data->perf_caps, target_freq); - cpu_data->perf_ctrls.desired_perf = desired_perf; + cpu_data->perf_ctrls.desired_perf = + cppc_khz_to_perf(&cpu_data->perf_caps, target_freq); ret = cppc_set_perf(cpu, &cpu_data->perf_ctrls); if (ret) {