public inbox for u-boot-amlogic@groups.io
 help / color / mirror / Atom feed
From: Yao Zi <ziyao@disroot.org>
To: Andrew Goodbody <andrew.goodbody@linaro.org>,
	u-boot-amlogic@groups.io, u-boot@lists.denx.de,
	Paul Barker <paul@pbarker.dev>,
	uboot-snps-arc@synopsys.com,
	Dai Okamura <okamura.dai@socionext.com>,
	Aspeed BMC SW team <BMC-SW@aspeedtech.com>,
	Joel Stanley <joel@jms.id.au>,
	GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,
	adsp-linux@analog.com, uboot-stm32@st-md-mailman.stormreply.com
Cc: Lukasz Majewski <lukma@denx.de>,
	Sean Anderson <seanga2@gmail.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Tom Rini <trini@konsulko.com>,
	Stefan Roese <stefan.roese@mailbox.org>,
	Leo Yu-Chi Liang <ycliang@andestech.com>,
	Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Simon Glass <sjg@chromium.org>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Kever Yang <kever.yang@rock-chips.com>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Lukasz Czechowski <lukasz.czechowski@thaumatec.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Finley Xiao <finley.xiao@rock-chips.com>,
	Joseph Chen <chenjh@rock-chips.com>,
	Elaine Zhang <zhangqing@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>,
	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
	Peng Fan <peng.fan@nxp.com>,
	Liviu Dudau <liviu.dudau@foss.arm.com>,
	Michal Simek <michal.simek@amd.com>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Ye Li <ye.li@nxp.com>, Sam Protsenko <semen.protsenko@linaro.org>,
	Marek Vasut <marex@denx.de>, Alice Guo <alice.guo@nxp.com>,
	Valentin Caron <valentin.caron@foss.st.com>,
	Padmarao Begari <padmarao.begari@amd.com>,
	Minda Chen <minda.chen@starfivetech.com>,
	Hal Feng <hal.feng@starfivetech.com>,
	Sumit Garg <sumit.garg@kernel.org>,
	Tien Fong Chee <tien.fong.chee@altera.com>,
	Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>,
	Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>,
	Muhammad Hazim Izzat Zamri
	<muhammad.hazim.izzat.zamri@altera.com>,
	Tingting Meng <tingting.meng@altera.com>,
	Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
	Ryan Chen <ryan_chen@aspeedtech.com>,
	Chia-Wei Wang <chiawei_wang@aspeedtech.com>,
	Minkyu Kang <mk7.kang@samsung.com>,
	Heiko Schocher <hs@nabladev.com>,
	Jonathan Currier <dullfire@yahoo.com>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Weijie Gao <weijie.gao@mediatek.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Sam Shih <sam.shih@mediatek.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Thierry Reding <treding@nvidia.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
	Greg Malysa <malysagreg@gmail.com>,
	Ian Roberts <ian.roberts@timesys.com>,
	Vasileios Bimpikas <vasileios.bimpikas@analog.com>,
	Utsav Agarwal <utsav.agarwal@analog.com>,
	Arturs Artamonovs <arturs.artamonovs@analog.com>,
	Gabriel Fernandez <gabriel.fernandez@foss.st.com>,
	Marek Vasut <marek.vasut@mailbox.org>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>
Subject: Re: [PATCH 04/24] clk: thead: th1520-ap: Remove negative error returns from clk_get_rate
Date: Thu, 16 Oct 2025 04:53:40 +0000	[thread overview]
Message-ID: <aPB6VPMiOcUknoJO@pie> (raw)
In-Reply-To: <20251015-clk_ops-v1-4-5f80f827407e@linaro.org>

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 <andrew.goodbody@linaro.org>
> ---
>  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 <ziyao@disroot.org>

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
> 


  reply	other threads:[~2025-10-20  7:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 14:32 [PATCH 00/24] clk: Remove passing of negative errors through unsigned return Andrew Goodbody
2025-10-15 14:32 ` [PATCH 01/24] clk: meson: Remove negative error returns from clk_get_rate Andrew Goodbody
2025-10-18  8:34   ` Simon Glass
2025-10-15 14:32 ` [PATCH 02/24] clk: sifive: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 03/24] clk: armada-37xx: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 04/24] clk: thead: th1520-ap: " Andrew Goodbody
2025-10-16  4:53   ` Yao Zi [this message]
2025-10-15 14:32 ` [PATCH 05/24] clk: ccf: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 06/24] clk: at91: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 07/24] clk: renesas: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 08/24] clk: rockchip: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 10/24] clk: starfive: " Andrew Goodbody
2025-10-17  6:16   ` Hal Feng
2025-10-15 14:32 ` [PATCH 12/24] clk: uniphier: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 14/24] clk: nuvoton: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 15/24] clk: exynos: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 20/24] clk: tegra: " Andrew Goodbody
2025-10-15 14:32 ` [PATCH 24/24] clk: x86: " Andrew Goodbody
     [not found] ` <20251015-clk_ops-v1-23-5f80f827407e@linaro.org>
2025-10-16  7:37   ` [PATCH 23/24] clk: stm32: " Patrice CHOTARD
     [not found] ` <20251015-clk_ops-v1-21-5f80f827407e@linaro.org>
2025-10-17  4:02   ` [PATCH 21/24] clk: adi: " Greg Malysa
2025-10-18  8:34 ` [PATCH 00/24] clk: Remove passing of negative errors through unsigned return Simon Glass
2025-10-18 14:04   ` Tom Rini
2025-10-18 18:16     ` Philipp Tomsich
2025-10-19 13:05     ` Simon Glass
2025-10-19 13:45       ` Svyatoslav Ryhel
2025-10-19 16:21         ` Tom Rini
2025-10-19 18:28           ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aPB6VPMiOcUknoJO@pie \
    --to=ziyao@disroot.org \
    --cc=BMC-SW@aspeedtech.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=adsp-linux@analog.com \
    --cc=alice.guo@nxp.com \
    --cc=alif.zakuan.yuslaimi@altera.com \
    --cc=andrew.goodbody@linaro.org \
    --cc=arturs.artamonovs@analog.com \
    --cc=chenjh@rock-chips.com \
    --cc=chiawei_wang@aspeedtech.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=clamor95@gmail.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=dullfire@yahoo.com \
    --cc=finley.xiao@rock-chips.com \
    --cc=gabriel.fernandez@foss.st.com \
    --cc=hal.feng@starfivetech.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=heiko@sntech.de \
    --cc=hs@nabladev.com \
    --cc=ian.roberts@timesys.com \
    --cc=iwamatsu@nigauri.org \
    --cc=joel@jms.id.au \
    --cc=jonas@kwiboo.se \
    --cc=kever.yang@rock-chips.com \
    --cc=liviu.dudau@foss.arm.com \
    --cc=lukasz.czechowski@thaumatec.com \
    --cc=lukma@denx.de \
    --cc=malysagreg@gmail.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=marek.vasut@mailbox.org \
    --cc=marex@denx.de \
    --cc=michal.simek@amd.com \
    --cc=minda.chen@starfivetech.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mk7.kang@samsung.com \
    --cc=muhammad.hazim.izzat.zamri@altera.com \
    --cc=nareshkumar.ravulapalli@altera.com \
    --cc=nathan.morrison@timesys.com \
    --cc=neil.armstrong@linaro.org \
    --cc=okamura.dai@socionext.com \
    --cc=padmarao.begari@amd.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=paul@pbarker.dev \
    --cc=peng.fan@nxp.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=quentin.schulz@cherry.de \
    --cc=ryan_chen@aspeedtech.com \
    --cc=ryder.lee@mediatek.com \
    --cc=sam.shih@mediatek.com \
    --cc=seanga2@gmail.com \
    --cc=semen.protsenko@linaro.org \
    --cc=sjg@chromium.org \
    --cc=stefan.roese@mailbox.org \
    --cc=sumit.garg@kernel.org \
    --cc=tien.fong.chee@altera.com \
    --cc=tingting.meng@altera.com \
    --cc=treding@nvidia.com \
    --cc=trini@konsulko.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-snps-arc@synopsys.com \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    --cc=utsav.agarwal@analog.com \
    --cc=valentin.caron@foss.st.com \
    --cc=vasileios.bimpikas@analog.com \
    --cc=weijie.gao@mediatek.com \
    --cc=ycliang@andestech.com \
    --cc=ye.li@nxp.com \
    --cc=zhangqing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox