From: Dinh Nguyen <dinguyen@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-clk@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: socfpga: remove redundant assignment on division
Date: Mon, 27 Dec 2021 04:38:44 -0600 [thread overview]
Message-ID: <1ad78a3b-3faa-c6fe-be6e-d518eeadea50@kernel.org> (raw)
In-Reply-To: <20211221003750.212780-1-colin.i.king@gmail.com>
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>
next prev parent reply other threads:[~2021-12-27 10:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 0:37 Colin Ian King
2021-12-27 10:38 ` Dinh Nguyen [this message]
2022-01-06 0:32 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ad78a3b-3faa-c6fe-be6e-d518eeadea50@kernel.org \
--to=dinguyen@kernel.org \
--cc=colin.i.king@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome