Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1312010 > unrolled thread

[PATCH v2 2/3] clk: s2mps11: merge two for loop in one

Started byAndi Shyti <andi.shyti@samsung.com>
First post2016-01-19 10:00 +0100
Last post2016-01-20 00:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 2/3] clk: s2mps11: merge two for loop in one Andi Shyti <andi.shyti@samsung.com> - 2016-01-19 10:00 +0100
    Re: [PATCH v2 2/3] clk: s2mps11: merge two for loop in one Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-20 00:40 +0100

#1312010 — [PATCH v2 2/3] clk: s2mps11: merge two for loop in one

FromAndi Shyti <andi.shyti@samsung.com>
Date2016-01-19 10:00 +0100
Subject[PATCH v2 2/3] clk: s2mps11: merge two for loop in one
Message-ID<qSAiR-5me-5@gated-at.bofh.it>
the driver already loops once, there is no reason to loop again
for a different purpose. Merge the second loop into the first.

Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
---
 drivers/clk/clk-s2mps11.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index 22d4df2..cae92fc 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -202,12 +202,6 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
 			ret = -ENOMEM;
 			goto err_reg;
 		}
-	}
-
-	for (i = 0; i < S2MPS11_CLKS_NUM; i++) {
-		/* Skip clocks not present on S2MPS14 */
-		if (i == S2MPS11_CLK_CP && hwid == S2MPS14X)
-			continue;
 		clk_table[i] = s2mps11_clks[i].clk;
 	}
 
-- 
2.7.0.rc3

[toc] | [next] | [standalone]


#1312585

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2016-01-20 00:40 +0100
Message-ID<qSO2u-6lC-23@gated-at.bofh.it>
In reply to#1312010
On 19.01.2016 17:52, Andi Shyti wrote:
> the driver already loops once, there is no reason to loop again

/s/the/The/

> for a different purpose. Merge the second loop into the first.
> 
> Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
> ---
>  drivers/clk/clk-s2mps11.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
> index 22d4df2..cae92fc 100644
> --- a/drivers/clk/clk-s2mps11.c
> +++ b/drivers/clk/clk-s2mps11.c
> @@ -202,12 +202,6 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
>  			ret = -ENOMEM;
>  			goto err_reg;
>  		}
> -	}
> -
> -	for (i = 0; i < S2MPS11_CLKS_NUM; i++) {
> -		/* Skip clocks not present on S2MPS14 */
> -		if (i == S2MPS11_CLK_CP && hwid == S2MPS14X)

You changed this line in patch 1/3 - meaningless. This is a indication
that this patch should go before 1st.

BR,
Krzysztof

> -			continue;
>  		clk_table[i] = s2mps11_clks[i].clk;
>  	}
>  
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web