mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
d3a337a592
* updated SNAND/SNFI driver brings support for MT7981 * add support for MediaTek NAND Memory bad Block Management (NMBM) (not used for any boards atm, but could be useful in future) * wire up NMBM support for MT7622, MT7629, MT7981 and MT7986 * replace some local patches with updated version from SDK * bring some legacy precompiler symbols which haven't been converted into Kconfig symbols in U-Boot 2022.07, remove when bumbping to U-Boot 2022.10: 100-28-include-configs-mt7986-h-from-SDK.patch Source: https://github.com/mtk-openwrt/u-boot Signed-off-by: Daniel Golle <daniel@makrotopia.org>
44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
From 19f2aa053d5531a9ca0ece04dca172a522d58b90 Mon Sep 17 00:00:00 2001
|
|
From: Weijie Gao <weijie.gao@mediatek.com>
|
|
Date: Fri, 29 Jul 2022 11:32:28 +0800
|
|
Subject: [PATCH 32/71] clk: remove log_ret from clk_get_rate
|
|
|
|
The return value of clk_get_rate is ulong, an unsigned type. The size of
|
|
ulong depends on the cpu architecture, i.e. 4 bytes on 32-bit CPUs and
|
|
8 bytes on 64-bit CPUs.
|
|
|
|
However log_ret only accepts and returns value in int type, a fixed 4-byte
|
|
type. This may truncate the real clock value and cause unexpected error on
|
|
64-bit platforms.
|
|
|
|
This patch removes log_ret to solve this issue.
|
|
|
|
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
|
|
---
|
|
drivers/clk/clk-uclass.c | 7 +------
|
|
1 file changed, 1 insertion(+), 6 deletions(-)
|
|
|
|
--- a/drivers/clk/clk-uclass.c
|
|
+++ b/drivers/clk/clk-uclass.c
|
|
@@ -469,7 +469,6 @@ void clk_free(struct clk *clk)
|
|
ulong clk_get_rate(struct clk *clk)
|
|
{
|
|
const struct clk_ops *ops;
|
|
- int ret;
|
|
|
|
debug("%s(clk=%p)\n", __func__, clk);
|
|
if (!clk_valid(clk))
|
|
@@ -479,11 +478,7 @@ ulong clk_get_rate(struct clk *clk)
|
|
if (!ops->get_rate)
|
|
return -ENOSYS;
|
|
|
|
- ret = ops->get_rate(clk);
|
|
- if (ret)
|
|
- return log_ret(ret);
|
|
-
|
|
- return 0;
|
|
+ return ops->get_rate(clk);
|
|
}
|
|
|
|
struct clk *clk_get_parent(struct clk *clk)
|