Skip to content

Commit 72449a9

Browse files
committed
Merge tag 'sunxi-clk-for-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner
Pull an Allwinner clk driver update from Jernej Skrabec: - cleanup variable init in Allwinner nkm module * tag 'sunxi-clk-for-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: nkm: remove redundant initialization of tmp_parent
2 parents b85ea95 + 89e0044 commit 72449a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/clk/sunxi-ng/ccu_nkm.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@ static unsigned long ccu_nkm_find_best_with_parent_adj(struct ccu_common *common
2121
unsigned long *parent, unsigned long rate,
2222
struct _ccu_nkm *nkm)
2323
{
24-
unsigned long best_rate = 0, best_parent_rate = *parent, tmp_parent = *parent;
24+
unsigned long best_rate = 0, best_parent_rate = *parent;
2525
unsigned long best_n = 0, best_k = 0, best_m = 0;
2626
unsigned long _n, _k, _m;
2727

2828
for (_k = nkm->min_k; _k <= nkm->max_k; _k++) {
2929
for (_n = nkm->min_n; _n <= nkm->max_n; _n++) {
3030
for (_m = nkm->min_m; _m <= nkm->max_m; _m++) {
31-
unsigned long tmp_rate;
31+
unsigned long tmp_rate, tmp_parent;
3232

3333
tmp_parent = clk_hw_round_rate(parent_hw, rate * _m / (_n * _k));
34-
3534
tmp_rate = tmp_parent * _n * _k / _m;
3635

3736
if (ccu_is_better_rate(common, rate, tmp_rate, best_rate) ||

0 commit comments

Comments
 (0)