From: Viresh Kumar <viresh.kumar@linaro.org> To: rnayak@codeaurora.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Viresh Kumar <viresh.kumar@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com> Cc: linux-pm@vger.kernel.org, Vincent Guittot <vincent.guittot@linaro.org>, Stephen Boyd <sboyd@kernel.org>, Nishanth Menon <nm@ti.com>, Douglas Anderson <dianders@chromium.org>, Naresh Kamboju <naresh.kamboju@linaro.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 1/8] cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table() Date: Fri, 28 Aug 2020 11:37:46 +0530 [thread overview] Message-ID: <84dc113f3ada31c858481077d7b535af2765a084.1598594714.git.viresh.kumar@linaro.org> (raw) In-Reply-To: <cover.1598594714.git.viresh.kumar@linaro.org> dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- V2: No changes. --- drivers/cpufreq/imx6q-cpufreq.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index ef7b34c1fd2b..5bf5fc759881 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -48,7 +48,6 @@ static struct clk_bulk_data clks[] = { }; static struct device *cpu_dev; -static bool free_opp; static struct cpufreq_frequency_table *freq_table; static unsigned int max_freq; static unsigned int transition_latency; @@ -390,9 +389,6 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) goto put_reg; } - /* Because we have added the OPPs here, we must free them */ - free_opp = true; - if (of_machine_is_compatible("fsl,imx6ul") || of_machine_is_compatible("fsl,imx6ull")) { ret = imx6ul_opp_check_speed_grading(cpu_dev); @@ -507,8 +503,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) free_freq_table: dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); out_free_opp: - if (free_opp) - dev_pm_opp_of_remove_table(cpu_dev); + dev_pm_opp_of_remove_table(cpu_dev); put_reg: if (!IS_ERR(arm_reg)) regulator_put(arm_reg); @@ -528,8 +523,7 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&imx6q_cpufreq_driver); dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); - if (free_opp) - dev_pm_opp_of_remove_table(cpu_dev); + dev_pm_opp_of_remove_table(cpu_dev); regulator_put(arm_reg); if (!IS_ERR(pu_reg)) regulator_put(pu_reg); -- 2.25.0.rc1.19.g042ed3e048af
WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org> To: rnayak@codeaurora.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Viresh Kumar <viresh.kumar@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com> Cc: Nishanth Menon <nm@ti.com>, Vincent Guittot <vincent.guittot@linaro.org>, linux-pm@vger.kernel.org, Stephen Boyd <sboyd@kernel.org>, Naresh Kamboju <naresh.kamboju@linaro.org>, Douglas Anderson <dianders@chromium.org>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 1/8] cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table() Date: Fri, 28 Aug 2020 11:37:46 +0530 [thread overview] Message-ID: <84dc113f3ada31c858481077d7b535af2765a084.1598594714.git.viresh.kumar@linaro.org> (raw) In-Reply-To: <cover.1598594714.git.viresh.kumar@linaro.org> dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- V2: No changes. --- drivers/cpufreq/imx6q-cpufreq.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index ef7b34c1fd2b..5bf5fc759881 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -48,7 +48,6 @@ static struct clk_bulk_data clks[] = { }; static struct device *cpu_dev; -static bool free_opp; static struct cpufreq_frequency_table *freq_table; static unsigned int max_freq; static unsigned int transition_latency; @@ -390,9 +389,6 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) goto put_reg; } - /* Because we have added the OPPs here, we must free them */ - free_opp = true; - if (of_machine_is_compatible("fsl,imx6ul") || of_machine_is_compatible("fsl,imx6ull")) { ret = imx6ul_opp_check_speed_grading(cpu_dev); @@ -507,8 +503,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) free_freq_table: dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); out_free_opp: - if (free_opp) - dev_pm_opp_of_remove_table(cpu_dev); + dev_pm_opp_of_remove_table(cpu_dev); put_reg: if (!IS_ERR(arm_reg)) regulator_put(arm_reg); @@ -528,8 +523,7 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&imx6q_cpufreq_driver); dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); - if (free_opp) - dev_pm_opp_of_remove_table(cpu_dev); + dev_pm_opp_of_remove_table(cpu_dev); regulator_put(arm_reg); if (!IS_ERR(pu_reg)) regulator_put(pu_reg); -- 2.25.0.rc1.19.g042ed3e048af _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-08-28 6:09 UTC|newest] Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-28 6:07 [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table() Viresh Kumar 2020-08-28 6:07 ` Viresh Kumar 2020-08-28 6:07 ` Viresh Kumar 2020-08-28 6:07 ` Viresh Kumar [this message] 2020-08-28 6:07 ` [PATCH V2 1/8] cpufreq: imx6q: " Viresh Kumar 2020-08-28 6:07 ` [PATCH V2 2/8] drm/lima: " Viresh Kumar 2020-08-28 6:07 ` Viresh Kumar 2020-10-22 5:14 ` Viresh Kumar 2020-10-22 5:14 ` Viresh Kumar 2020-08-28 6:07 ` [PATCH V2 3/8] drm/msm: " Viresh Kumar 2020-08-28 6:07 ` Viresh Kumar 2020-09-01 7:31 ` Rajendra Nayak 2020-09-01 7:31 ` Rajendra Nayak 2020-09-01 8:38 ` Viresh Kumar 2020-09-01 8:38 ` Viresh Kumar 2020-09-01 9:45 ` Rajendra Nayak 2020-09-01 9:45 ` Rajendra Nayak 2020-09-01 9:50 ` Viresh Kumar 2020-09-01 9:50 ` Viresh Kumar 2020-10-05 6:26 ` Viresh Kumar 2020-10-05 6:26 ` Viresh Kumar 2020-10-21 7:24 ` Viresh Kumar 2020-10-21 7:24 ` Viresh Kumar 2020-10-21 16:58 ` Rob Clark 2020-10-21 16:58 ` Rob Clark 2020-10-22 5:12 ` Viresh Kumar 2020-10-22 5:12 ` Viresh Kumar 2020-08-28 6:07 ` [PATCH V2 4/8] mmc: sdhci-msm: " Viresh Kumar 2020-08-28 8:43 ` Ulf Hansson 2020-08-28 15:06 ` Doug Anderson 2020-08-31 6:23 ` Viresh Kumar 2020-08-31 10:44 ` Viresh Kumar 2020-08-31 10:57 ` Ulf Hansson 2020-09-09 11:07 ` Viresh Kumar 2020-09-09 12:48 ` Ulf Hansson 2020-08-28 6:07 ` [PATCH V2 5/8] spi: spi-geni-qcom: " Viresh Kumar 2020-08-28 6:07 ` [PATCH V2 6/8] spi: spi-qcom-qspi: " Viresh Kumar 2020-08-28 6:07 ` [PATCH V2 7/8] tty: serial: qcom_geni_serial: " Viresh Kumar 2020-08-28 6:07 ` [PATCH V2 8/8] qcom-geni-se: remove has_opp_table Viresh Kumar 2020-10-21 7:34 ` Viresh Kumar 2020-10-21 15:31 ` Doug Anderson 2020-08-31 11:09 ` [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table() Viresh Kumar 2020-08-31 11:09 ` Viresh Kumar 2020-08-31 11:09 ` Viresh Kumar 2020-09-09 11:08 ` Viresh Kumar 2020-09-09 11:08 ` Viresh Kumar 2020-09-09 11:08 ` Viresh Kumar 2020-09-09 15:28 ` Mark Brown 2020-09-09 15:28 ` Mark Brown 2020-09-09 15:28 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=84dc113f3ada31c858481077d7b535af2765a084.1598594714.git.viresh.kumar@linaro.org \ --to=viresh.kumar@linaro.org \ --cc=dianders@chromium.org \ --cc=festevam@gmail.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=naresh.kamboju@linaro.org \ --cc=nm@ti.com \ --cc=rjw@rjwysocki.net \ --cc=rnayak@codeaurora.org \ --cc=s.hauer@pengutronix.de \ --cc=sboyd@kernel.org \ --cc=shawnguo@kernel.org \ --cc=vincent.guittot@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.