[net-next v3 8/9] net: mvpp2: Convert to devm_clk_get_enabled() and devm_clk_get_optional_enabled()

Marcin Wojtas marcin.s.wojtas at gmail.com
Wed Aug 28 06:39:13 PDT 2024


śr., 28 sie 2024 o 09:13 Geert Uytterhoeven <geert at linux-m68k.org> napisał(a):
>
> Hi Marcin,
>
> On Wed, Aug 28, 2024 at 8:26 AM Marcin Wojtas <marcin.s.wojtas at gmail.com> wrote:
> > wt., 27 sie 2024 o 13:09 Jonathan Cameron
> > <Jonathan.Cameron at huawei.com> napisał(a):
> > > On Tue, 27 Aug 2024 03:57:11 -0600
> > > Yangtao Li <frank.li at vivo.com> wrote:
> > > > Use devm_clk_get_enabled() and devm_clk_get_optional_enabled()
> > > > to simplify code.
> > > >
> > > > Signed-off-by: Yangtao Li <frank.li at vivo.com>
> > > > Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
> > > > Tested-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
> > > > Suggested-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
> > > > Reviewed-by: Marcin Wojtas <marcin.s.wojtas at gmail.com>
> > >
> > > >
> > > > @@ -7745,12 +7710,6 @@ static void mvpp2_remove(struct platform_device *pdev)
> > > >
> > > >       if (!dev_of_node(&pdev->dev))
> > > >               return;
> > >
> > > Given this makes no difference any more, drop the above dev_of_node() check.
> >
> > This check is to not execute the clk-related code when booting with
> > ACPI. It should remain as-is, unless the new devm_clk_get* api is
> > capable of not exploding in non-DT case. Can you confirm?
>
> As per the removals below, there is no code left in this function after
> the check (i.e. the "else" part became empty).
>
> > > > -
> > > > -     clk_disable_unprepare(priv->axi_clk);
> > > > -     clk_disable_unprepare(priv->mg_core_clk);
> > > > -     clk_disable_unprepare(priv->mg_clk);
> > > > -     clk_disable_unprepare(priv->pp_clk);
> > > > -     clk_disable_unprepare(priv->gop_clk);
> > > >  }
>
> Gr{oetje,eeting}s,
>
>                         Geert
>

You are right, I misread that it was mvpp2_probe :) I confirm, we can
remove in mvpp2_remove.

Best regards,
Marcin



More information about the linux-arm-kernel mailing list