On Wed, Dec 13, 2023 at 2:32 PM Arnd Bergmann [off-list ref] wrote:
On Wed, Dec 13, 2023, at 02:26, Guo Ren wrote:
quoted
On Wed, Dec 13, 2023 at 5:45 AM Arnd Bergmann [off-list ref] wrote:
quoted
{
const struct sun50i_a100_ledc_timing *timing = &priv->timing;
unsigned long mod_freq = clk_get_rate(priv->mod_clk);
- u32 cycle_ns = NSEC_PER_SEC / mod_freq;
+ u32 cycle_ns;
u32 control;
+ if (!mod_freq)
+ return;
+
Shall we need err_disable_bus_clk?
+ static int sun50i_a100_ledc_set_timing(struct sun50i_a100_ledc *priv)
- static void sun50i_a100_ledc_set_timing(struct sun50i_a100_ledc *priv)
I'm not worried about it too much, as there is already an error check
on priv->mod_clk being unavailable during initialization. The case that
the warning is about is just for build-testing on architectures that
don't even use COMMON_CLK.
Okay
Reviewed-by: Guo Ren <guoren@kernel.org>
Arnd
--
Best Regards
Guo Ren
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel