From nobody Tue Feb 10 11:32:48 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7A2732E88B7; Tue, 21 Oct 2025 10:12:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761041567; cv=none; b=hflgbPrI9PY/91/nYu98xomIzWpMVB3GTaCeZ4XiX5YYcMA0B9FRumGoSYn8NlQhG8bKQR/jpKiN2FKI4AzpeQGnzq0y81kbIz+uOPBT8AppoXXx1SWs+E0QIFGxtPLlWI4SiupdOfK8PEJVpBzMtGX9fPvizEVIKJMR1dI8s3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761041567; c=relaxed/simple; bh=lXJHHFptBMpEYGRhwmXvUj9/TcSk3rk7mp2Kop2wt9E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=poMBYn6/+GSgG1gy512Jz5aR2vDFS9SCXXL5gWTlC/Kro1wI4iBFxkbThvxWzlaIUiInhK0eUpNSiGj7k4ov8ct28xSwS1qTsFalOkhzpPihy4KFO8Rzqy6kLpN9gfPI3+OvYIHaVRgUVf+9AeKwyZhOxQS/hfnsU2Np2KPGHzs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UGBXTSBo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UGBXTSBo" Received: by smtp.kernel.org (Postfix) with ESMTPS id 2CC1FC4CEFF; Tue, 21 Oct 2025 10:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761041567; bh=lXJHHFptBMpEYGRhwmXvUj9/TcSk3rk7mp2Kop2wt9E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=UGBXTSBoU4r/S+NZXqhliuLYbstQY8dOy0nH6RUhm91QvPFnmEnoOlM9S8fgReF+4 9PwJVabUwkI6b2BRAK1usBU2EygbxdsF6nNQ5ZT2Z8om9RE5dVRJpc6qq6Cwo6W385 DHAQKIyfDR+mt1QKYPo/DSY1dzkWyp1ot4htAGydAWa4UrDJJqOV/U6ZOl2eA4NDAL UxwHQKRjezLLf7vJwA3iiWkbEFQzrgzHaXVgDcx2xD17TRyzcv2Q+ZbWmC4eNq2qiI Bw4MT4Mb95zsScm0tpo4WmLz25R65LFJdTJ490ogM71qtr6S2RFZwJMMjb7bjb+hS1 ojAKYDrsTW27w== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EBB5CCD184; Tue, 21 Oct 2025 10:12:47 +0000 (UTC) From: Chuan Liu via B4 Relay Date: Tue, 21 Oct 2025 18:12:31 +0800 Subject: [PATCH 2/2] clk: divider: improve the execution efficiency of determine_rate() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251021-improve_efficiency_of_clk_divider-v1-2-e2bf7f625af6@amlogic.com> References: <20251021-improve_efficiency_of_clk_divider-v1-0-e2bf7f625af6@amlogic.com> In-Reply-To: <20251021-improve_efficiency_of_clk_divider-v1-0-e2bf7f625af6@amlogic.com> To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Chuan Liu X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1761041565; l=652; i=chuan.liu@amlogic.com; s=20240902; h=from:subject:message-id; bh=4yJ8TlYve5AF/Eq9UZTnZIGY2BOewY1lDoBVTOtUsrQ=; b=VxzxRsKA+iZOgpD1UJltY5o1FNELeaOzfb/BDwqRVvD76/IppmfZ9jTzZLKPqGAMOhcmHJAjj rl/nsdMNhmcCEN7UCfH8OZkpW8gduzzcOFoM8CGg2yw+nVCORYeyBAO X-Developer-Key: i=chuan.liu@amlogic.com; a=ed25519; pk=fnKDB+81SoWGKW2GJNFkKy/ULvsDmJZRGBE7pR5Xcpo= X-Endpoint-Received: by B4 Relay for chuan.liu@amlogic.com/20240902 with auth_id=203 X-Original-From: Chuan Liu Reply-To: chuan.liu@amlogic.com From: Chuan Liu There is no need to evaluate further divider values once _is_best_div() finds one that matches the target rate. Signed-off-by: Chuan Liu --- drivers/clk/clk-divider.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index 2601b6155afb..b92c4f800fa9 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -339,6 +339,9 @@ static int clk_divider_bestdiv(struct clk_hw *hw, struc= t clk_hw *parent, best =3D now; *best_parent_rate =3D parent_rate; } + + if (best =3D=3D rate) + break; } =20 if (!bestdiv) { --=20 2.42.0