linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: socfpga: remove redundant assignment on division
@ 2021-12-21  0:37 Colin Ian King
  2021-12-27 10:38 ` Dinh Nguyen
  2022-01-06  0:32 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2021-12-21  0:37 UTC (permalink / raw)
  To: Dinh Nguyen, Michael Turquette, Stephen Boyd, linux-clk
  Cc: kernel-janitors, linux-kernel

The variable parent_rate is being divided by div and the result
is re-assigned to parent_rate before being returned. The assignment
is redundant, replace /= operator with just / operator.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/clk/socfpga/clk-pll-s10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/socfpga/clk-pll-s10.c b/drivers/clk/socfpga/clk-pll-s10.c
index 70076a80149d..e444e4a0ee53 100644
--- a/drivers/clk/socfpga/clk-pll-s10.c
+++ b/drivers/clk/socfpga/clk-pll-s10.c
@@ -113,7 +113,7 @@ static unsigned long clk_boot_clk_recalc_rate(struct clk_hw *hwclk,
 		SWCTRLBTCLKSEL_MASK) >>
 		SWCTRLBTCLKSEL_SHIFT);
 	div += 1;
-	return parent_rate /= div;
+	return parent_rate / div;
 }
 
 
-- 
2.32.0


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

* Re: [PATCH] clk: socfpga: remove redundant assignment on division
  2021-12-21  0:37 [PATCH] clk: socfpga: remove redundant assignment on division Colin Ian King
@ 2021-12-27 10:38 ` Dinh Nguyen
  2022-01-06  0:32 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Dinh Nguyen @ 2021-12-27 10:38 UTC (permalink / raw)
  To: Colin Ian King, Michael Turquette, Stephen Boyd, linux-clk
  Cc: kernel-janitors, linux-kernel



On 12/20/21 6:37 PM, Colin Ian King wrote:
> The variable parent_rate is being divided by div and the result
> is re-assigned to parent_rate before being returned. The assignment
> is redundant, replace /= operator with just / operator.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>   drivers/clk/socfpga/clk-pll-s10.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/socfpga/clk-pll-s10.c b/drivers/clk/socfpga/clk-pll-s10.c
> index 70076a80149d..e444e4a0ee53 100644
> --- a/drivers/clk/socfpga/clk-pll-s10.c
> +++ b/drivers/clk/socfpga/clk-pll-s10.c
> @@ -113,7 +113,7 @@ static unsigned long clk_boot_clk_recalc_rate(struct clk_hw *hwclk,
>   		SWCTRLBTCLKSEL_MASK) >>
>   		SWCTRLBTCLKSEL_SHIFT);
>   	div += 1;
> -	return parent_rate /= div;
> +	return parent_rate / div;
>   }
>   

Acked-by: Dinh Nguyen <dinguyen@kernel.org>

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

* Re: [PATCH] clk: socfpga: remove redundant assignment on division
  2021-12-21  0:37 [PATCH] clk: socfpga: remove redundant assignment on division Colin Ian King
  2021-12-27 10:38 ` Dinh Nguyen
@ 2022-01-06  0:32 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2022-01-06  0:32 UTC (permalink / raw)
  To: Colin Ian King, Dinh Nguyen, Michael Turquette, linux-clk
  Cc: kernel-janitors, linux-kernel

Quoting Colin Ian King (2021-12-20 16:37:50)
> The variable parent_rate is being divided by div and the result
> is re-assigned to parent_rate before being returned. The assignment
> is redundant, replace /= operator with just / operator.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---

Applied to clk-next

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

end of thread, other threads:[~2022-01-06  0:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21  0:37 [PATCH] clk: socfpga: remove redundant assignment on division Colin Ian King
2021-12-27 10:38 ` Dinh Nguyen
2022-01-06  0:32 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).