Message ID | 085541814ebe2543cb7e8a31004c0da3e7d5b6eb.1688760111.git.christophe.jaillet@wanadoo.fr (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | clk: starfive: Simplify .determine_rate() | expand |
On Fri, 7 Jul 2023 at 22:02, Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote: > > jh71x0_clk_mux_determine_rate() is the same as __clk_mux_determine_rate(), > so use the latter to save some LoC. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Thanks! Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> > --- > drivers/clk/starfive/clk-starfive-jh71x0.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/clk/starfive/clk-starfive-jh71x0.c b/drivers/clk/starfive/clk-starfive-jh71x0.c > index b372083d11c3..aebc99264a0b 100644 > --- a/drivers/clk/starfive/clk-starfive-jh71x0.c > +++ b/drivers/clk/starfive/clk-starfive-jh71x0.c > @@ -174,12 +174,6 @@ static int jh71x0_clk_set_parent(struct clk_hw *hw, u8 index) > return 0; > } > > -static int jh71x0_clk_mux_determine_rate(struct clk_hw *hw, > - struct clk_rate_request *req) > -{ > - return clk_mux_determine_rate_flags(hw, req, 0); > -} > - > static int jh71x0_clk_get_phase(struct clk_hw *hw) > { > struct jh71x0_clk *clk = jh71x0_clk_from(hw); > @@ -261,7 +255,7 @@ static const struct clk_ops jh71x0_clk_gdiv_ops = { > }; > > static const struct clk_ops jh71x0_clk_mux_ops = { > - .determine_rate = jh71x0_clk_mux_determine_rate, > + .determine_rate = __clk_mux_determine_rate, > .set_parent = jh71x0_clk_set_parent, > .get_parent = jh71x0_clk_get_parent, > .debug_init = jh71x0_clk_debug_init, > @@ -271,7 +265,7 @@ static const struct clk_ops jh71x0_clk_gmux_ops = { > .enable = jh71x0_clk_enable, > .disable = jh71x0_clk_disable, > .is_enabled = jh71x0_clk_is_enabled, > - .determine_rate = jh71x0_clk_mux_determine_rate, > + .determine_rate = __clk_mux_determine_rate, > .set_parent = jh71x0_clk_set_parent, > .get_parent = jh71x0_clk_get_parent, > .debug_init = jh71x0_clk_debug_init, > -- > 2.34.1 >
Quoting Christophe JAILLET (2023-07-07 13:02:18) > jh71x0_clk_mux_determine_rate() is the same as __clk_mux_determine_rate(), > so use the latter to save some LoC. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- Applied to clk-next
diff --git a/drivers/clk/starfive/clk-starfive-jh71x0.c b/drivers/clk/starfive/clk-starfive-jh71x0.c index b372083d11c3..aebc99264a0b 100644 --- a/drivers/clk/starfive/clk-starfive-jh71x0.c +++ b/drivers/clk/starfive/clk-starfive-jh71x0.c @@ -174,12 +174,6 @@ static int jh71x0_clk_set_parent(struct clk_hw *hw, u8 index) return 0; } -static int jh71x0_clk_mux_determine_rate(struct clk_hw *hw, - struct clk_rate_request *req) -{ - return clk_mux_determine_rate_flags(hw, req, 0); -} - static int jh71x0_clk_get_phase(struct clk_hw *hw) { struct jh71x0_clk *clk = jh71x0_clk_from(hw); @@ -261,7 +255,7 @@ static const struct clk_ops jh71x0_clk_gdiv_ops = { }; static const struct clk_ops jh71x0_clk_mux_ops = { - .determine_rate = jh71x0_clk_mux_determine_rate, + .determine_rate = __clk_mux_determine_rate, .set_parent = jh71x0_clk_set_parent, .get_parent = jh71x0_clk_get_parent, .debug_init = jh71x0_clk_debug_init, @@ -271,7 +265,7 @@ static const struct clk_ops jh71x0_clk_gmux_ops = { .enable = jh71x0_clk_enable, .disable = jh71x0_clk_disable, .is_enabled = jh71x0_clk_is_enabled, - .determine_rate = jh71x0_clk_mux_determine_rate, + .determine_rate = __clk_mux_determine_rate, .set_parent = jh71x0_clk_set_parent, .get_parent = jh71x0_clk_get_parent, .debug_init = jh71x0_clk_debug_init,
jh71x0_clk_mux_determine_rate() is the same as __clk_mux_determine_rate(), so use the latter to save some LoC. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- drivers/clk/starfive/clk-starfive-jh71x0.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)