- cleanup variable init in nkm module

-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCZXtSxwAKCRB0Ba7+DO8k
 k0osAPwKOT+DHtde4z+7wcjgRBXtvrjdhP83a4SCWpv+kmhsugEAzSs0GJ0vwcBd
 ry2wr9CAYC+5T2cezgEGb247+G5+fA8=
 =l9Ku
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Stephen Boyd 2023-12-16 16:30:45 -08:00
commit 72449a9035

View File

@ -21,17 +21,16 @@ static unsigned long ccu_nkm_find_best_with_parent_adj(struct ccu_common *common
unsigned long *parent, unsigned long rate,
struct _ccu_nkm *nkm)
{
unsigned long best_rate = 0, best_parent_rate = *parent, tmp_parent = *parent;
unsigned long best_rate = 0, best_parent_rate = *parent;
unsigned long best_n = 0, best_k = 0, best_m = 0;
unsigned long _n, _k, _m;
for (_k = nkm->min_k; _k <= nkm->max_k; _k++) {
for (_n = nkm->min_n; _n <= nkm->max_n; _n++) {
for (_m = nkm->min_m; _m <= nkm->max_m; _m++) {
unsigned long tmp_rate;
unsigned long tmp_rate, tmp_parent;
tmp_parent = clk_hw_round_rate(parent_hw, rate * _m / (_n * _k));
tmp_rate = tmp_parent * _n * _k / _m;
if (ccu_is_better_rate(common, rate, tmp_rate, best_rate) ||