All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 03/13] clk: Remove clock ID check in .get_rate() of clk_fixed_*
Date: Sat, 8 Jun 2019 17:22:00 +0200	[thread overview]
Message-ID: <80f37a2f-b5bb-c08c-feae-6d44450b6980@denx.de> (raw)
In-Reply-To: <20190516221042.3583-4-lukma@denx.de>



On 17/05/19 00:10, Lukasz Majewski wrote:
> This check requires the struct clk passed to .get_rate() to be always
> cleared out as any clock with valid ID causes -EINVAL return value.
> 
> The return code of fixed clocks shall always be returned.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> 
> ---
> 
> Changes in v4:
> - None
> 
> Changes in v3: None
> 
>  drivers/clk/clk_fixed_factor.c | 3 ---
>  drivers/clk/clk_fixed_rate.c   | 3 ---
>  2 files changed, 6 deletions(-)
> 
> diff --git a/drivers/clk/clk_fixed_factor.c b/drivers/clk/clk_fixed_factor.c
> index 5fa20a84db..dcdb6ddf5c 100644
> --- a/drivers/clk/clk_fixed_factor.c
> +++ b/drivers/clk/clk_fixed_factor.c
> @@ -24,9 +24,6 @@ static ulong clk_fixed_factor_get_rate(struct clk *clk)
>  	uint64_t rate;
>  	struct clk_fixed_factor *ff = to_clk_fixed_factor(clk->dev);
>  
> -	if (clk->id != 0)
> -		return -EINVAL;
> -
>  	rate = clk_get_rate(&ff->parent);
>  	if (IS_ERR_VALUE(rate))
>  		return rate;
> diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c
> index d8d9f86c86..50dbb13655 100644
> --- a/drivers/clk/clk_fixed_rate.c
> +++ b/drivers/clk/clk_fixed_rate.c
> @@ -15,9 +15,6 @@ struct clk_fixed_rate {
>  
>  static ulong clk_fixed_rate_get_rate(struct clk *clk)
>  {
> -	if (clk->id != 0)
> -		return -EINVAL;
> -
>  	return to_clk_fixed_rate(clk->dev)->fixed_rate;
>  }
>  
> 

Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  parent reply	other threads:[~2019-06-08 15:22 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 22:10 [U-Boot] [PATCH v4 00/13] clk: Port Linux common clock framework [CCF] to U-boot (tag: 5.0-rc3) Lukasz Majewski
2019-05-16 22:10 ` [U-Boot] [PATCH v4 01/13] clk: doc: Add documentation entry for Common Clock Framework [CCF] (i.MX) Lukasz Majewski
2019-05-16 23:22   ` Marek Vasut
2019-05-17  6:15   ` Peng Fan
2019-06-10  9:40   ` [U-Boot] [PATCH v4 01/13] clk: doc: Add documentation entry for sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 02/13] dm: Fix documentation entry as there is no UCLASS_CLOCK uclass Lukasz Majewski
2019-05-17  5:52   ` Peng Fan
2019-06-10  9:59   ` [U-Boot] [PATCH v4 02/13] dm: Fix documentation entry as there is sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 03/13] clk: Remove clock ID check in .get_rate() of clk_fixed_* Lukasz Majewski
2019-05-17  5:53   ` Peng Fan
2019-06-08 15:22   ` Stefano Babic [this message]
2019-06-10  9:39   ` [U-Boot] [PATCH v4 03/13] clk: Remove clock ID check in .get_rate() sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 04/13] clk: Extend struct clk to provide information regarding clock rate Lukasz Majewski
2019-05-16 23:23   ` Marek Vasut
2019-05-17  6:42     ` Lukasz Majewski
2019-06-08 15:22   ` Stefano Babic
2019-06-10  9:59   ` [U-Boot] [PATCH v4 04/13] clk: Extend struct clk to provide sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 05/13] clk: Extend struct clk to provide clock type agnostic flags Lukasz Majewski
2019-05-17  5:54   ` Peng Fan
2019-06-08 15:22   ` Stefano Babic
2019-06-10  9:40   ` [U-Boot] [PATCH v4 05/13] clk: Extend struct clk to provide clock sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 06/13] clk: Provide struct clk for fixed rate clock (clk_fixed_rate.c) Lukasz Majewski
2019-05-17  5:55   ` Peng Fan
2019-06-08 15:23   ` Stefano Babic
2019-06-10  9:40   ` [U-Boot] [PATCH v4 06/13] clk: Provide struct clk for fixed rate sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 07/13] dm: clk: Define clk_get_parent() for clk operations Lukasz Majewski
2019-05-17  5:46   ` Peng Fan
2019-05-17  5:56     ` Peng Fan
2019-05-17  5:57   ` Peng Fan
2019-05-18 16:08   ` Simon Glass
2019-05-18 20:52     ` Lukasz Majewski
2019-05-18 22:04       ` Simon Glass
2019-06-08 15:24   ` Stefano Babic
2019-06-10  9:40   ` [U-Boot] [PATCH v4 07/13] dm: clk: Define clk_get_parent() for clk sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 08/13] dm: clk: Define clk_get_parent_rate() for clk operations Lukasz Majewski
2019-05-17  5:58   ` Peng Fan
2019-05-18 16:08   ` Simon Glass
2019-05-18 20:45     ` Lukasz Majewski
2019-06-10  9:39   ` [U-Boot] [PATCH v4 08/13] dm: clk: Define clk_get_parent_rate() for sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 09/13] dm: clk: Define clk_get_by_id() for clk operations Lukasz Majewski
2019-05-17  5:58   ` Peng Fan
2019-05-18 16:08   ` Simon Glass
2019-05-18 20:44     ` Lukasz Majewski
2019-06-08 15:24   ` Stefano Babic
2019-06-10  9:39   ` [U-Boot] [PATCH v4 09/13] dm: clk: Define clk_get_by_id() for clk sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 10/13] clk: test: Provide unit test for clk_get_by_id() method Lukasz Majewski
2019-05-17  6:00   ` Peng Fan
2019-06-10  9:41   ` [U-Boot] [PATCH v4 10/13] clk: test: Provide unit test for sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 11/13] clk: test: Provide unit test for clk_get_parent_rate() method Lukasz Majewski
2019-05-18 16:33   ` Simon Glass
2019-06-10  9:49   ` [U-Boot] [PATCH v4 11/13] clk: test: Provide unit test for sbabic at denx.de
2019-05-16 22:10 ` [U-Boot] [PATCH v4 12/13] clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: 5.0-rc3) Lukasz Majewski
2019-05-17  2:48   ` Bin Meng
2019-05-17 12:31     ` Adam Ford
2019-05-17 13:19       ` Lukasz Majewski
2019-06-10  9:40   ` [U-Boot] [PATCH v4 12/13] clk: Port Linux common clock framework sbabic at denx.de
2019-06-10 21:36   ` Lukasz Majewski
2019-06-11  8:29     ` Stefano Babic
2019-05-16 22:10 ` [U-Boot] [PATCH v4 13/13] dm: clk: Extend clk_get_parent_rate() to support CLK_GET_RATE_NOCACHE flag Lukasz Majewski
2019-05-17  6:03   ` Peng Fan
2019-06-10  9:39   ` [U-Boot] [PATCH v4 13/13] dm: clk: Extend clk_get_parent_rate() to sbabic at denx.de
2019-05-18 16:08 ` [U-Boot] [PATCH v4 00/13] clk: Port Linux common clock framework [CCF] to U-boot (tag: 5.0-rc3) Simon Glass
2019-05-18 20:49   ` Lukasz Majewski
2019-05-18 22:02     ` Simon Glass
2019-05-19 14:34       ` Lukasz Majewski
2019-05-20 15:35         ` 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=80f37a2f-b5bb-c08c-feae-6d44450b6980@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 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.