diff mbox series

[2/2] clk: imx: clk-divider-gate: drop redundant initialization

Message ID 1572862200-29923-2-git-send-email-peng.fan@nxp.com (mailing list archive)
State Mainlined
Commit 2871736869f031a02deb67ae24794e149ee16a4a
Headers show
Series [1/2] clk: imx: clk-divider-gate: typo fix | expand

Commit Message

Peng Fan Nov. 4, 2019, 10:11 a.m. UTC
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(-)

Comments

Abel Vesa Nov. 5, 2019, 11:37 a.m. UTC | #1
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
>
Shawn Guo Dec. 2, 2019, 9:02 a.m. UTC | #2
On Mon, Nov 04, 2019 at 10:11:37AM +0000, 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>

Applied, thanks.
diff mbox series

Patch

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);