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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BC30BCCD19A for ; Thu, 16 Oct 2025 13:06:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ACA1983804; Thu, 16 Oct 2025 15:06:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=disroot.org header.i=@disroot.org header.b="SQQysX8u"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 16122829E7; Thu, 16 Oct 2025 06:54:20 +0200 (CEST) Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D02E180077 for ; Thu, 16 Oct 2025 06:54:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: phobos.denx.de; spf=pass smtp.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) 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251015-clk_ops-v1-4-5f80f827407e@linaro.org> X-Mailman-Approved-At: Thu, 16 Oct 2025 15:06:00 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 >