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 40BF02D4805; Wed, 25 Feb 2026 06:58:01 +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=1772002681; cv=none; b=sFXz/n+QFtgZkmtGwo5msK3aJjMGCO4wCiV9LZq1zASSQhklF768Xqv7dJ0p6ywEWTnhNDb/+jZ6oH75eIuUMqNCftyKJbVWlcKKDBOZx+2IiaA25rsP+UVEyWHmnb6QonYwRWqVGjpHRfz0KzSb6DOFuYCPKjDMOHQQGFM3ws8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772002681; c=relaxed/simple; bh=PuYbNJX7Hy9Dbyr750xXnqxAQuHoZ0iDEuF7YCDxjBc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kHYl8+gNPEtdUJRmFAb0KvYs8FppuURCVSNmUrowY824uCESbpaN1E6RJKVFzXUc7ZPyTrmU7D0OGoqRjoMwcPkyr3OiNjdaohzwlD4XzFPkcrzZMgHHphom/kcuQpqJndL45bAiyaPLPGJAy/93dB9/lDrx0BC5PfHr8QIUo1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=a6fKJXkt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="a6fKJXkt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1908CC116D0; Wed, 25 Feb 2026 06:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1772002681; bh=PuYbNJX7Hy9Dbyr750xXnqxAQuHoZ0iDEuF7YCDxjBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a6fKJXktkIuYnRlVeIahcL6X5G5+9/DkduY91HEdKczDJyNhp/3SafOJSRZG7gID7 N47B5d6qMT+fjF4Bf7I4zxki97VB9XKo8wSmDZ+xGjMRoLfWBdQoAMUPon8sknQIdR 6l6OyXAQYzYj4bW7+sO4aszhkv9LA2TsKdkZs+qo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Brian Masney , Abel Vesa , Konrad Dybcio , Bjorn Andersson , Sasha Levin Subject: [PATCH 6.18 426/641] clk: qcom: regmap-divider: convert from divider_round_rate() to divider_determine_rate() Date: Tue, 24 Feb 2026 17:22:32 -0800 Message-ID: <20260225012358.870597424@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260225012348.915798704@linuxfoundation.org> References: <20260225012348.915798704@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Brian Masney [ Upstream commit d8300e6e078a3a44ac0c75c6d8ba46d78ab94035 ] The divider_round_rate() function is now deprecated, so let's migrate to divider_determine_rate() instead so that this deprecated API can be removed. Note that when the main function itself was migrated to use determine_rate, this was mistakenly converted to: req->rate = divider_round_rate(...) This is invalid in the case when an error occurs since it can set the rate to a negative value. Fixes: b6f90511c165 ("clk: qcom: regmap-divider: convert from round_rate() to determine_rate()") Signed-off-by: Brian Masney Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260108-clk-divider-round-rate-v1-16-535a3ed73bf3@redhat.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/clk/qcom/clk-regmap-divider.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/clk-regmap-divider.c b/drivers/clk/qcom/clk-regmap-divider.c index af9c01dd78537..672e82caf2050 100644 --- a/drivers/clk/qcom/clk-regmap-divider.c +++ b/drivers/clk/qcom/clk-regmap-divider.c @@ -34,12 +34,8 @@ static int div_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { struct clk_regmap_div *divider = to_clk_regmap_div(hw); - req->rate = divider_round_rate(hw, req->rate, &req->best_parent_rate, - NULL, - divider->width, - CLK_DIVIDER_ROUND_CLOSEST); - - return 0; + return divider_determine_rate(hw, req, NULL, divider->width, + CLK_DIVIDER_ROUND_CLOSEST); } static int div_set_rate(struct clk_hw *hw, unsigned long rate, -- 2.51.0