Re: [PATCH v12 02/10] clk: nuvoton: ma35d1: Use clk_hw pointers as mux parents
From: Miquel Raynal
Date: Tue Nov 24 2026 - 11:45:08 EST
Hi Jerome,
>> static struct clk_hw *ma35d1_clk_mux(struct device *dev, const char *name,
>> void __iomem *reg, u8 shift, u8 width,
>> - const struct clk_parent_data *pdata,
>> - int num_pdata)
>> + struct clk_hw **hws,
>> + const int *parent_idx, int num_parents)
>> {
>> - return clk_hw_register_mux_parent_data(dev, name, pdata, num_pdata,
>> - CLK_SET_RATE_NO_REPARENT, reg, shift,
>> - width, 0, &ma35d1_lock);
>> + const struct clk_hw *parent_hws[MA35D1_MUX_MAX_PARENTS] = {};
>
>
> It works but a little check to make sure we do not overflow the table here
> would be nice.
That's maybe a bit more future-proof so I'll add it, but at the moment
I believe this is almost dead code since every caller passes a static
ARRAY_SIZE(). But not a blocker for me, will be added to v13.
Thanks,
Miquèl