* [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate
@ 2017-07-13 21:06 Wolfram Sang
2017-07-14 14:23 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2017-07-13 21:06 UTC (permalink / raw)
To: linux-clk
Cc: linux-renesas-soc, Geert Uytterhoeven, Takeshi Kihara, Wolfram Sang
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
In .recalc_rate of struct clk_ops, it is desirable to return 0 if an
error occurs, but -EINVAL is returned. This patch fixes it.
Fixes: 5b1defde7054 ("clk: renesas: cpg-mssr: Extract common R-Car Gen3 support code")
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Totally valid patch forwarded from BSP.
drivers/clk/renesas/rcar-gen3-cpg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index 3dee900522b703..e7371a8c4eb701 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -147,7 +147,7 @@ static unsigned long cpg_sd_clock_recalc_rate(struct clk_hw *hw,
break;
if (i >= clock->div_num)
- return -EINVAL;
+ return 0;
return DIV_ROUND_CLOSEST(rate, clock->div_table[i].div);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate
2017-07-13 21:06 [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate Wolfram Sang
@ 2017-07-14 14:23 ` Wolfram Sang
0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-07-14 14:23 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-clk, linux-renesas-soc, Geert Uytterhoeven, Takeshi Kihara
[-- Attachment #1: Type: text/plain, Size: 641 bytes --]
On Thu, Jul 13, 2017 at 11:06:56PM +0200, Wolfram Sang wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> In .recalc_rate of struct clk_ops, it is desirable to return 0 if an
> error occurs, but -EINVAL is returned. This patch fixes it.
>
> Fixes: 5b1defde7054 ("clk: renesas: cpg-mssr: Extract common R-Car Gen3 support code")
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
I just saw that Kaneko-san posted this patch as well:
https://patchwork.kernel.org/patch/9688509/
Please pick his patch, I'll add my Rev-by there.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate
@ 2017-04-19 17:46 Yoshihiro Kaneko
0 siblings, 0 replies; 3+ messages in thread
From: Yoshihiro Kaneko @ 2017-04-19 17:46 UTC (permalink / raw)
To: linux-clk
Cc: Michael Turquette, Stephen Boyd, Geert Uytterhoeven,
Simon Horman, Magnus Damm, linux-renesas-soc
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
In .recalc_rate of struct clk_ops, it is desirable to return 0 if an
error occurs, but -EINVAL is returned. This patch fixes it.
Fixes: 5b1defde7054 ("clk: renesas: cpg-mssr: Extract common R-Car Gen3 support code")
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---
This patch is based on the clk-next branch of linux-clk tree.
drivers/clk/renesas/rcar-gen3-cpg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index 4ab76b1..48c6e98 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -287,7 +287,7 @@ static unsigned long cpg_sd_clock_recalc_rate(struct clk_hw *hw,
break;
if (i >= clock->div_num)
- return -EINVAL;
+ return 0;
return DIV_ROUND_CLOSEST(rate, clock->div_table[i].div);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-14 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-13 21:06 [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate Wolfram Sang
2017-07-14 14:23 ` Wolfram Sang
-- strict thread matches above, loose matches on Subject: below --
2017-04-19 17:46 Yoshihiro Kaneko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.