Linux-Clk Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] clk: imx: clk-divider-gate: typo fix
@ 2019-11-04 10:11 Peng Fan
  2019-11-04 10:11 ` [PATCH 2/2] clk: imx: clk-divider-gate: drop redundant initialization Peng Fan
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Fan @ 2019-11-04 10:11 UTC (permalink / raw)
  To: sboyd, shawnguo, s.hauer, festevam, Abel Vesa
  Cc: kernel, dl-linux-imx, Aisheng Dong, linux-clk, linux-arm-kernel,
	linux-kernel, Leonard Crestez, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

resue->reuse

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/clk/imx/clk-divider-gate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/imx/clk-divider-gate.c b/drivers/clk/imx/clk-divider-gate.c
index 2a8352a316c7..214e18eb2b22 100644
--- a/drivers/clk/imx/clk-divider-gate.c
+++ b/drivers/clk/imx/clk-divider-gate.c
@@ -167,7 +167,7 @@ static const struct clk_ops clk_divider_gate_ops = {
 };
 
 /*
- * NOTE: In order to resue the most code from the common divider,
+ * NOTE: In order to reuse the most code from the common divider,
  * we also design our divider following the way that provids an extra
  * clk_divider_flags, however it's fixed to CLK_DIVIDER_ONE_BASED by
  * default as our HW is. Besides that it supports only CLK_DIVIDER_READ_ONLY
-- 
2.16.4


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

* [PATCH 2/2] clk: imx: clk-divider-gate: drop redundant initialization
  2019-11-04 10:11 [PATCH 1/2] clk: imx: clk-divider-gate: typo fix Peng Fan
@ 2019-11-04 10:11 ` Peng Fan
  2019-11-05 11:37   ` Abel Vesa
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Fan @ 2019-11-04 10:11 UTC (permalink / raw)
  To: sboyd, shawnguo, s.hauer, festevam, Abel Vesa
  Cc: kernel, dl-linux-imx, Aisheng Dong, linux-clk, linux-arm-kernel,
	linux-kernel, Leonard Crestez, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

There is no need to initialize flags as 0.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/clk/imx/clk-divider-gate.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/imx/clk-divider-gate.c b/drivers/clk/imx/clk-divider-gate.c
index 214e18eb2b22..4145594af53b 100644
--- a/drivers/clk/imx/clk-divider-gate.c
+++ b/drivers/clk/imx/clk-divider-gate.c
@@ -43,7 +43,7 @@ static unsigned long clk_divider_gate_recalc_rate(struct clk_hw *hw,
 {
 	struct clk_divider_gate *div_gate = to_clk_divider_gate(hw);
 	struct clk_divider *div = to_clk_divider(hw);
-	unsigned long flags = 0;
+	unsigned long flags;
 	unsigned int val;
 
 	spin_lock_irqsave(div->lock, flags);
@@ -75,7 +75,7 @@ static int clk_divider_gate_set_rate(struct clk_hw *hw, unsigned long rate,
 {
 	struct clk_divider_gate *div_gate = to_clk_divider_gate(hw);
 	struct clk_divider *div = to_clk_divider(hw);
-	unsigned long flags = 0;
+	unsigned long flags;
 	int value;
 	u32 val;
 
@@ -104,7 +104,7 @@ static int clk_divider_enable(struct clk_hw *hw)
 {
 	struct clk_divider_gate *div_gate = to_clk_divider_gate(hw);
 	struct clk_divider *div = to_clk_divider(hw);
-	unsigned long flags = 0;
+	unsigned long flags;
 	u32 val;
 
 	if (!div_gate->cached_val) {
@@ -127,7 +127,7 @@ static void clk_divider_disable(struct clk_hw *hw)
 {
 	struct clk_divider_gate *div_gate = to_clk_divider_gate(hw);
 	struct clk_divider *div = to_clk_divider(hw);
-	unsigned long flags = 0;
+	unsigned long flags;
 	u32 val;
 
 	spin_lock_irqsave(div->lock, flags);
-- 
2.16.4


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

* Re: [PATCH 2/2] clk: imx: clk-divider-gate: drop redundant initialization
  2019-11-04 10:11 ` [PATCH 2/2] clk: imx: clk-divider-gate: drop redundant initialization Peng Fan
@ 2019-11-05 11:37   ` Abel Vesa
  0 siblings, 0 replies; 3+ messages in thread
From: Abel Vesa @ 2019-11-05 11:37 UTC (permalink / raw)
  To: Peng Fan
  Cc: sboyd, shawnguo, s.hauer, festevam, kernel, dl-linux-imx,
	Aisheng Dong, linux-clk, linux-arm-kernel, linux-kernel,
	Leonard Crestez

On 19-11-04 10:11:37, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> There is no need to initialize flags as 0.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

> ---
>  drivers/clk/imx/clk-divider-gate.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-divider-gate.c b/drivers/clk/imx/clk-divider-gate.c
> index 214e18eb2b22..4145594af53b 100644
> --- a/drivers/clk/imx/clk-divider-gate.c
> +++ b/drivers/clk/imx/clk-divider-gate.c
> @@ -43,7 +43,7 @@ static unsigned long clk_divider_gate_recalc_rate(struct clk_hw *hw,
>  {
>  	struct clk_divider_gate *div_gate = to_clk_divider_gate(hw);
>  	struct clk_divider *div = to_clk_divider(hw);
> -	unsigned long flags = 0;
> +	unsigned long flags;
>  	unsigned int val;
>  
>  	spin_lock_irqsave(div->lock, flags);
> @@ -75,7 +75,7 @@ static int clk_divider_gate_set_rate(struct clk_hw *hw, unsigned long rate,
>  {
>  	struct clk_divider_gate *div_gate = to_clk_divider_gate(hw);
>  	struct clk_divider *div = to_clk_divider(hw);
> -	unsigned long flags = 0;
> +	unsigned long flags;
>  	int value;
>  	u32 val;
>  
> @@ -104,7 +104,7 @@ static int clk_divider_enable(struct clk_hw *hw)
>  {
>  	struct clk_divider_gate *div_gate = to_clk_divider_gate(hw);
>  	struct clk_divider *div = to_clk_divider(hw);
> -	unsigned long flags = 0;
> +	unsigned long flags;
>  	u32 val;
>  
>  	if (!div_gate->cached_val) {
> @@ -127,7 +127,7 @@ static void clk_divider_disable(struct clk_hw *hw)
>  {
>  	struct clk_divider_gate *div_gate = to_clk_divider_gate(hw);
>  	struct clk_divider *div = to_clk_divider(hw);
> -	unsigned long flags = 0;
> +	unsigned long flags;
>  	u32 val;
>  
>  	spin_lock_irqsave(div->lock, flags);
> -- 
> 2.16.4
> 

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04 10:11 [PATCH 1/2] clk: imx: clk-divider-gate: typo fix Peng Fan
2019-11-04 10:11 ` [PATCH 2/2] clk: imx: clk-divider-gate: drop redundant initialization Peng Fan
2019-11-05 11:37   ` Abel Vesa

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org
	public-inbox-index linux-clk

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git