From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 E8F48CCD1BD for ; Mon, 20 Oct 2025 07:35:44 +0000 (UTC) Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by mx.groups.io with SMTP id smtpd.web10.1217.1760591020709780588 for ; Wed, 15 Oct 2025 22:03:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@disroot.org header.s=mail header.b=SQQysX8u; spf=pass (domain: disroot.org, ip: 178.21.23.139, mailfrom: ziyao@disroot.org) Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0C89B20D0D; Thu, 16 Oct 2025 06:54:17 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id MW2-OO5HRg8L; Thu, 16 Oct 2025 06:54:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1760590456; bh=fs4oHPb2OIxpefS5s1KkAXnUyfFBSX6CJU84Y8g5d+s=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=SQQysX8u10sxBE4WuRt0pN6u2eXeg2DI/Xo2XjMDKPMXG3Ck5hp6oq/C0j7/KpxT9 kJQDTKhRkH+oZsUQ9LjCHCB800uZTg0JzHTWoiyP67RMW870PCbh3W8hthi/B4VTOA vI8uR2EHRDLVE1THqQV+Nt0lqqzFVW35QoBoikBWaSXpC3gDOWv9KY9iVMITWaIwuL q3QRc0hVfy1Vv6Y2A4kK/oEF4sw7fR+J2YVZquLQhVQ6F1VT+hMw5WJLHGxc9mR23L tOteALgE77bdo7/EcnYI7anESZXEKlFXYOpaENlEDYrAaSIvl0KElcPSzHjOqvGiFw kCP1skA4/IVDA== Date: Thu, 16 Oct 2025 04:53:40 +0000 From: Yao Zi To: Andrew Goodbody , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Paul Barker , uboot-snps-arc@synopsys.com, Dai Okamura , Aspeed BMC SW team , Joel Stanley , GSS_MTK_Uboot_upstream , adsp-linux@analog.com, uboot-stm32@st-md-mailman.stormreply.com Cc: Lukasz Majewski , Sean Anderson , Neil Armstrong , Tom Rini , Stefan Roese , Leo Yu-Chi Liang , Nobuhiro Iwamatsu , Marek Vasut , Simon Glass , Philipp Tomsich , Kever Yang , Quentin Schulz , Lukasz Czechowski , Jonas Karlman , Finley Xiao , Joseph Chen , Elaine Zhang , Heiko Stuebner , Eugeniy Paltsev , Peng Fan , Liviu Dudau , Michal Simek , Patrice Chotard , Miquel Raynal , Patrick Delaunay , Ye Li , Sam Protsenko , Marek Vasut , Alice Guo , Valentin Caron , Padmarao Begari , Minda Chen , Hal Feng , Sumit Garg , Tien Fong Chee , Alif Zakuan Yuslaimi , Naresh Kumar Ravulapalli , Muhammad Hazim Izzat Zamri , Tingting Meng , Kunihiko Hayashi , Ryan Chen , Chia-Wei Wang , Minkyu Kang , Heiko Schocher , Jonathan Currier , Ryder Lee , Weijie Gao , Chunfeng Yun , Sam Shih , Manivannan Sadhasivam , Thierry Reding , Svyatoslav Ryhel , Nathan Barrett-Morrison , Greg Malysa , Ian Roberts , Vasileios Bimpikas , Utsav Agarwal , Arturs Artamonovs , Gabriel Fernandez , Marek Vasut , Dario Binacchi Subject: Re: [PATCH 04/24] clk: thead: th1520-ap: Remove negative error returns from clk_get_rate Message-ID: References: <20251015-clk_ops-v1-0-5f80f827407e@linaro.org> <20251015-clk_ops-v1-4-5f80f827407e@linaro.org> MIME-Version: 1.0 In-Reply-To: <20251015-clk_ops-v1-4-5f80f827407e@linaro.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Oct 2025 07:35:44 -0000 X-Groupsio-URL: https://groups.io/g/u-boot-amlogic/message/2827 On Wed, Oct 15, 2025 at 03:32:09PM +0100, Andrew Goodbody wrote: > clk_get_rate() returns a ulong so do not attempt to pass negative error > codes through it. > > Signed-off-by: Andrew Goodbody > --- > drivers/clk/thead/clk-th1520-ap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I want to switch to ccf_clk_* in the future, but this patch looks good to me as a fix alone. Acked-by: Yao Zi Tested on Lichee Pi 4A board with no regression found. Best regards, Yao Zi > diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th1520-ap.c > index 6899e1b595a7148a118d3a615d5dfea4b4fb5b96..e913621967eb131b534e8f5b928687967a02a30e 100644 > --- a/drivers/clk/thead/clk-th1520-ap.c > +++ b/drivers/clk/thead/clk-th1520-ap.c > @@ -985,7 +985,7 @@ static ulong th1520_clk_get_rate(struct clk *clk) > > ret = clk_get_by_id(clk->id, &c); > if (ret) > - return ret; > + return 0; > > return clk_get_rate(c); > } > > -- > 2.47.3 >