All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] clk: meson: remove duplicate logic
@ 2019-07-30 21:03 ` Heinrich Schuchardt
  0 siblings, 0 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2019-07-30 21:03 UTC (permalink / raw)
  To: u-boot

First thing we check in meson_clk_set_rate_by_id() is current_rate == rate.
There is not need to check it again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/clk/meson/gxbb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index 2cb53fb92d..abb5337e78 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -823,10 +823,7 @@ static ulong meson_clk_set_rate_by_id(struct clk *clk, unsigned long id,
 	case CLKID_MPLL1:
 	case CLKID_MPLL2:
 	case CLKID_CLK81:
-		if (current_rate != rate)
-			return -EINVAL;
-
-		return 0;
+		return -EINVAL;
 	case CLKID_VPU:
 		return meson_clk_set_rate_by_id(clk,
 				meson_mux_get_parent(clk, CLKID_VPU), rate,
--
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 1/1] clk: meson: remove duplicate logic
@ 2019-07-30 21:03 ` Heinrich Schuchardt
  0 siblings, 0 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2019-07-30 21:03 UTC (permalink / raw)
  To: Lukasz Majewski
  Cc: Jerome Brunet, Neil Armstrong, u-boot-amlogic, u-boot,
	Heinrich Schuchardt

First thing we check in meson_clk_set_rate_by_id() is current_rate == rate.
There is not need to check it again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/clk/meson/gxbb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index 2cb53fb92d..abb5337e78 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -823,10 +823,7 @@ static ulong meson_clk_set_rate_by_id(struct clk *clk, unsigned long id,
 	case CLKID_MPLL1:
 	case CLKID_MPLL2:
 	case CLKID_CLK81:
-		if (current_rate != rate)
-			return -EINVAL;
-
-		return 0;
+		return -EINVAL;
 	case CLKID_VPU:
 		return meson_clk_set_rate_by_id(clk,
 				meson_mux_get_parent(clk, CLKID_VPU), rate,
--
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/1] clk: meson: remove duplicate logic
  2019-07-30 21:03 ` Heinrich Schuchardt
@ 2019-07-31  7:17   ` Neil Armstrong
  -1 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2019-07-31  7:17 UTC (permalink / raw)
  To: u-boot

On 30/07/2019 23:03, Heinrich Schuchardt wrote:
> First thing we check in meson_clk_set_rate_by_id() is current_rate == rate.
> There is not need to check it again.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/clk/meson/gxbb.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
> index 2cb53fb92d..abb5337e78 100644
> --- a/drivers/clk/meson/gxbb.c
> +++ b/drivers/clk/meson/gxbb.c
> @@ -823,10 +823,7 @@ static ulong meson_clk_set_rate_by_id(struct clk *clk, unsigned long id,
>  	case CLKID_MPLL1:
>  	case CLKID_MPLL2:
>  	case CLKID_CLK81:
> -		if (current_rate != rate)
> -			return -EINVAL;
> -
> -		return 0;
> +		return -EINVAL;
>  	case CLKID_VPU:
>  		return meson_clk_set_rate_by_id(clk,
>  				meson_mux_get_parent(clk, CLKID_VPU), rate,
> --
> 2.20.1
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Applied on u-boot-amlogic

Thanks,
Neil

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] clk: meson: remove duplicate logic
@ 2019-07-31  7:17   ` Neil Armstrong
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2019-07-31  7:17 UTC (permalink / raw)
  To: Heinrich Schuchardt, Lukasz Majewski
  Cc: Jerome Brunet, u-boot-amlogic, u-boot

On 30/07/2019 23:03, Heinrich Schuchardt wrote:
> First thing we check in meson_clk_set_rate_by_id() is current_rate == rate.
> There is not need to check it again.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/clk/meson/gxbb.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
> index 2cb53fb92d..abb5337e78 100644
> --- a/drivers/clk/meson/gxbb.c
> +++ b/drivers/clk/meson/gxbb.c
> @@ -823,10 +823,7 @@ static ulong meson_clk_set_rate_by_id(struct clk *clk, unsigned long id,
>  	case CLKID_MPLL1:
>  	case CLKID_MPLL2:
>  	case CLKID_CLK81:
> -		if (current_rate != rate)
> -			return -EINVAL;
> -
> -		return 0;
> +		return -EINVAL;
>  	case CLKID_VPU:
>  		return meson_clk_set_rate_by_id(clk,
>  				meson_mux_get_parent(clk, CLKID_VPU), rate,
> --
> 2.20.1
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Applied on u-boot-amlogic

Thanks,
Neil

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-31  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 21:03 [U-Boot] [PATCH 1/1] clk: meson: remove duplicate logic Heinrich Schuchardt
2019-07-30 21:03 ` Heinrich Schuchardt
2019-07-31  7:17 ` [U-Boot] " Neil Armstrong
2019-07-31  7:17   ` Neil Armstrong

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.