lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGTfZH0DHXZqtiXNZrMA=pZMDG3zZpFez_sPvteAQgHXBs5WYQ@mail.gmail.com>
Date:   Tue, 5 Jan 2021 13:00:49 +0900
From:   Chanwoo Choi <cwchoi00@...il.com>
To:     Yangtao Li <tiny.windzz@...il.com>
Cc:     MyungJoo Ham <myungjoo.ham@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>, s.hauer@...gutronix.de,
        kernel@...gutronix.de, festevam@...il.com,
        dl-linux-imx <linux-imx@....com>,
        Dmitry Osipenko <digetx@...il.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>, yuq825@...il.com,
        David Airlie <airlied@...ux.ie>, daniel@...ll.ch,
        robdclark@...il.com, sean@...rly.run,
        Rob Herring <robh@...nel.org>, tomeu.vizoso@...labora.com,
        steven.price@....com, alyssa.rosenzweig@...labora.com,
        stanimir.varbanov@...aro.org, agross@...nel.org,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        mchehab@...nel.org, Lukasz Luba <lukasz.luba@....com>,
        adrian.hunter@...el.com, Ulf Hansson <ulf.hansson@...aro.org>,
        Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
        Stephen Boyd <sboyd@...nel.org>,
        Mark Brown <broonie@...nel.org>,
        Greg KH <gregkh@...uxfoundation.org>, jirislaby@...nel.org,
        "Rafael J. Wysocki" <rjw@...ysocki.net>, jcrouse@...eaurora.org,
        hoegsberg@...gle.com, eric@...olt.net, tzimmermann@...e.de,
        marijn.suijten@...ainline.org, gustavoars@...nel.org,
        emil.velikov@...labora.com, jonathan@...ek.ca,
        akhilpo@...eaurora.org, smasetty@...eaurora.org,
        airlied@...hat.com, masneyb@...tation.org, kalyan_t@...eaurora.org,
        tanmay@...eaurora.org, ddavenport@...omium.org,
        jsanka@...eaurora.org, rnayak@...eaurora.org,
        tongtiangen@...wei.com, miaoqinglang@...wei.com,
        khsieh@...eaurora.org, abhinavk@...eaurora.org,
        chandanu@...eaurora.org, Guenter Roeck <groeck@...omium.org>,
        varar@...eaurora.org, Matthias Kaehlcke <mka@...omium.org>,
        harigovi@...eaurora.org, rikard.falkeborn@...il.com,
        natechancellor@...il.com, Georgi Djakov <georgi.djakov@...aro.org>,
        akashast@...eaurora.org, parashar@...eaurora.org,
        Doug Anderson <dianders@...omium.org>,
        Linux PM list <linux-pm@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-tegra@...r.kernel.org,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        lima@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
        freedreno@...ts.freedesktop.org, linux-media@...r.kernel.org,
        linux-mmc@...r.kernel.org, linux-spi@...r.kernel.org,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH 27/31] PM / devfreq: rk3399_dmc: convert to use
 devm_pm_opp_* API

Hi,

Do you make this patch on latest source?
When I apply this patch for test, it make the merge conflict error.

On Sun, Jan 3, 2021 at 12:57 PM Yangtao Li <tiny.windzz@...il.com> wrote:
>
> Use devm_pm_opp_* API to simplify code. Since devres release
> can guarantee the order, let's remove
> devm_devfreq_unregister_opp_notifier().
>
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> ---
>  drivers/devfreq/rk3399_dmc.c | 22 +++-------------------
>  1 file changed, 3 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
> index 2e912166a993..9b8ab8be29d1 100644
> --- a/drivers/devfreq/rk3399_dmc.c
> +++ b/drivers/devfreq/rk3399_dmc.c
> @@ -432,7 +432,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
>          * We add a devfreq driver to our parent since it has a device tree node
>          * with operating points.
>          */
> -       if (dev_pm_opp_of_add_table(dev)) {
> +       if (devm_pm_opp_of_add_table(dev)) {
>                 dev_err(dev, "Invalid operating-points in device tree.\n");
>                 ret = -EINVAL;
>                 goto err_edev;
> @@ -448,7 +448,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
>         opp = devfreq_recommended_opp(dev, &data->rate, 0);
>         if (IS_ERR(opp)) {
>                 ret = PTR_ERR(opp);
> -               goto err_free_opp;
> +               goto err_edev;
>         }
>
>         data->rate = dev_pm_opp_get_freq(opp);
> @@ -463,7 +463,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
>                                            &data->ondemand_data);
>         if (IS_ERR(data->devfreq)) {
>                 ret = PTR_ERR(data->devfreq);
> -               goto err_free_opp;
> +               goto err_edev;
>         }
>
>         devm_devfreq_register_opp_notifier(dev, data->devfreq);
> @@ -473,27 +473,12 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
>
>         return 0;
>
> -err_free_opp:
> -       dev_pm_opp_of_remove_table(&pdev->dev);
>  err_edev:
>         devfreq_event_disable_edev(data->edev);
>
>         return ret;
>  }
>
> -static int rk3399_dmcfreq_remove(struct platform_device *pdev)
> -{
> -       struct rk3399_dmcfreq *dmcfreq = dev_get_drvdata(&pdev->dev);
> -
> -       /*
> -        * Before remove the opp table we need to unregister the opp notifier.
> -        */
> -       devm_devfreq_unregister_opp_notifier(dmcfreq->dev, dmcfreq->devfreq);
> -       dev_pm_opp_of_remove_table(dmcfreq->dev);

As the comment, we need to unregister the opp notifier before removing the OPP.
Do you guarantee this sequence on your patch?


> -
> -       return 0;
> -}
> -
>  static const struct of_device_id rk3399dmc_devfreq_of_match[] = {
>         { .compatible = "rockchip,rk3399-dmc" },
>         { },
> @@ -502,7 +487,6 @@ MODULE_DEVICE_TABLE(of, rk3399dmc_devfreq_of_match);
>
>  static struct platform_driver rk3399_dmcfreq_driver = {
>         .probe  = rk3399_dmcfreq_probe,
> -       .remove = rk3399_dmcfreq_remove,
>         .driver = {
>                 .name   = "rk3399-dmc-freq",
>                 .pm     = &rk3399_dmcfreq_pm,
> --
> 2.25.1
>


-- 
Best Regards,
Chanwoo Choi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ