Hi! Minor details here: > Signed-off-by: Geert Uytterhoeven > [PL: manually applied the changes] > Signed-off-by: Lad Prabhakar > +++ b/drivers/clk/renesas/r9a09g077-cpg.c > @@ -295,6 +334,151 @@ r9a09g077_cpg_mux_clk_register(struct device *dev, > return clk_hw->clk; > } > > +static unsigned int r9a09g077_cpg_fselxspi_get_divider(struct clk_hw *hw, unsigned long rate, > + unsigned int num_parents) > +{ > + struct clk_fixed_factor *ff; > + struct clk_hw *parent_hw; > + unsigned long best_rate; > + unsigned int i; > + > + for (i = 0; i < num_parents; i++) { > + parent_hw = clk_hw_get_parent_by_index(hw, i); > + best_rate = clk_hw_round_rate(parent_hw, rate); > + > + if (best_rate == rate) { > + ff = to_clk_fixed_factor(parent_hw); > + return ff->div; > + } > + } > + > + /* No parent could provide the exact rate - this should not happen */ > + return 0; > +} If it can't happen, WARN() may be suitable? > + > +static struct clk * __init > +r9a09g077_cpg_fselxspi_div_clk_register(struct device *dev, > + const struct cpg_core_clk *core, > + void __iomem *addr, ... > + if (!xspi_div_ops) { > + xspi_div_ops = devm_kzalloc(dev, sizeof(*xspi_div_ops), GFP_KERNEL); > + if (!xspi_div_ops) > + return ERR_PTR(-ENOMEM); One space would be enough between return and ERR. > + memcpy(xspi_div_ops, &clk_divider_ops, > + sizeof(const struct clk_ops)); And the memcpy does fit on single line. (May not be worth cleaning up unless you are doing changes for that anyway). Thanks and best regards, Pavel