Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: lan966x: Remove unused round_rate hook

The lan966x driver registers a gck clock with both a determine_rate and
a round_rate implementation. Both are equivalent, and are only called by
clk_core_determine_round_nolock() which favors determine_rate.

Thus, lan966x_gck_round_rate() is never called, so we can just remove
it.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221018-clk-range-checks-fixes-v4-5-971d5077e7d2@cerno.tech
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Maxime Ripard and committed by
Stephen Boyd
e2533dad 33b70fbc

-17
-17
drivers/clk/clk-lan966x.c
··· 103 103 return 0; 104 104 } 105 105 106 - static long lan966x_gck_round_rate(struct clk_hw *hw, unsigned long rate, 107 - unsigned long *parent_rate) 108 - { 109 - unsigned int div; 110 - 111 - if (rate == 0 || *parent_rate == 0) 112 - return -EINVAL; 113 - 114 - if (rate >= *parent_rate) 115 - return *parent_rate; 116 - 117 - div = DIV_ROUND_CLOSEST(*parent_rate, rate); 118 - 119 - return *parent_rate / div; 120 - } 121 - 122 106 static unsigned long lan966x_gck_recalc_rate(struct clk_hw *hw, 123 107 unsigned long parent_rate) 124 108 { ··· 161 177 .enable = lan966x_gck_enable, 162 178 .disable = lan966x_gck_disable, 163 179 .set_rate = lan966x_gck_set_rate, 164 - .round_rate = lan966x_gck_round_rate, 165 180 .recalc_rate = lan966x_gck_recalc_rate, 166 181 .determine_rate = lan966x_gck_determine_rate, 167 182 .set_parent = lan966x_gck_set_parent,