public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] clk: delete a local variable's repeated assignment
@ 2014-11-14  2:10 Zhen Lei
  2014-11-18 22:35 ` Mike Turquette
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2014-11-14  2:10 UTC (permalink / raw)
  To: Mike Turquette, linux-kernel
  Cc: Zefan Li, Xinwei Hu, Tianhong Ding, Kefeng Wang, Zhen Lei

It's the same to the next statement, "ret = clk->parent". I think compiler will
optimize it, it's just not looking well.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/clk/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 4896ae9..5307225 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1614,7 +1614,7 @@ static struct clk *__clk_init_parent(struct clk *clk)

 	if (clk->num_parents == 1) {
 		if (IS_ERR_OR_NULL(clk->parent))
-			ret = clk->parent = __clk_lookup(clk->parent_names[0]);
+			clk->parent = __clk_lookup(clk->parent_names[0]);
 		ret = clk->parent;
 		goto out;
 	}
--
1.8.0



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

* Re: [PATCH 1/1] clk: delete a local variable's repeated assignment
  2014-11-14  2:10 [PATCH 1/1] clk: delete a local variable's repeated assignment Zhen Lei
@ 2014-11-18 22:35 ` Mike Turquette
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Turquette @ 2014-11-18 22:35 UTC (permalink / raw)
  To: Zhen Lei, linux-kernel
  Cc: Zefan Li, Xinwei Hu, Tianhong Ding, Kefeng Wang, Zhen Lei

Quoting Zhen Lei (2014-11-13 18:10:40)
> It's the same to the next statement, "ret = clk->parent". I think compiler will
> optimize it, it's just not looking well.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

Applied.

Thanks,
Mike

> ---
>  drivers/clk/clk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 4896ae9..5307225 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1614,7 +1614,7 @@ static struct clk *__clk_init_parent(struct clk *clk)
> 
>         if (clk->num_parents == 1) {
>                 if (IS_ERR_OR_NULL(clk->parent))
> -                       ret = clk->parent = __clk_lookup(clk->parent_names[0]);
> +                       clk->parent = __clk_lookup(clk->parent_names[0]);
>                 ret = clk->parent;
>                 goto out;
>         }
> --
> 1.8.0
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

end of thread, other threads:[~2014-11-18 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-14  2:10 [PATCH 1/1] clk: delete a local variable's repeated assignment Zhen Lei
2014-11-18 22:35 ` Mike Turquette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox