* [PATCH] PM / devfreq: Fix handling dev_pm_qos_remove_request result @ 2020-03-12 3:15 ` Leonard Crestez 2020-03-12 3:30 ` Chanwoo Choi 0 siblings, 1 reply; 3+ messages in thread From: Leonard Crestez @ 2020-03-12 3:15 UTC (permalink / raw) To: Chanwoo Choi, Dan Carpenter Cc: Artur Świgoń, linux-pm, Viresh Kumar, Rafael J. Wysocki, Krzysztof Kozlowski, Kyungmin Park, MyungJoo Ham, linux-imx, Adam Ford, Matthias Kaehlcke, linux-arm-kernel The dev_pm_qos_remove_request function can return 1 if "aggregated constraint value has changed" so only negative values should be reported as errors. Fixes: 27dbc542f651 ("PM / devfreq: Use PM QoS for sysfs min/max_freq") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> --- drivers/devfreq/devfreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 5c481ad1cfc7..6fecd11dafdd 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -703,17 +703,17 @@ static void devfreq_dev_release(struct device *dev) dev_warn(dev->parent, "Failed to remove min_freq notifier: %d\n", err); if (dev_pm_qos_request_active(&devfreq->user_max_freq_req)) { err = dev_pm_qos_remove_request(&devfreq->user_max_freq_req); - if (err) + if (err < 0) dev_warn(dev->parent, "Failed to remove max_freq request: %d\n", err); } if (dev_pm_qos_request_active(&devfreq->user_min_freq_req)) { err = dev_pm_qos_remove_request(&devfreq->user_min_freq_req); - if (err) + if (err < 0) dev_warn(dev->parent, "Failed to remove min_freq request: %d\n", err); } if (devfreq->profile->exit) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] PM / devfreq: Fix handling dev_pm_qos_remove_request result 2020-03-12 3:15 ` [PATCH] PM / devfreq: Fix handling dev_pm_qos_remove_request result Leonard Crestez @ 2020-03-12 3:30 ` Chanwoo Choi 2020-03-12 6:31 ` Dan Carpenter 0 siblings, 1 reply; 3+ messages in thread From: Chanwoo Choi @ 2020-03-12 3:30 UTC (permalink / raw) To: Leonard Crestez, Dan Carpenter Cc: linux-pm, Viresh Kumar, Rafael J. Wysocki, Artur Świgoń, Krzysztof Kozlowski, Kyungmin Park, MyungJoo Ham, linux-imx, Adam Ford, Matthias Kaehlcke, linux-arm-kernel On 3/12/20 12:15 PM, Leonard Crestez wrote: > The dev_pm_qos_remove_request function can return 1 if > "aggregated constraint value has changed" so only negative values should > be reported as errors. > > Fixes: 27dbc542f651 ("PM / devfreq: Use PM QoS for sysfs min/max_freq") > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> > --- > drivers/devfreq/devfreq.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > index 5c481ad1cfc7..6fecd11dafdd 100644 > --- a/drivers/devfreq/devfreq.c > +++ b/drivers/devfreq/devfreq.c > @@ -703,17 +703,17 @@ static void devfreq_dev_release(struct device *dev) > dev_warn(dev->parent, > "Failed to remove min_freq notifier: %d\n", err); > > if (dev_pm_qos_request_active(&devfreq->user_max_freq_req)) { > err = dev_pm_qos_remove_request(&devfreq->user_max_freq_req); > - if (err) > + if (err < 0) > dev_warn(dev->parent, > "Failed to remove max_freq request: %d\n", err); > } > if (dev_pm_qos_request_active(&devfreq->user_min_freq_req)) { > err = dev_pm_qos_remove_request(&devfreq->user_min_freq_req); > - if (err) > + if (err < 0) > dev_warn(dev->parent, > "Failed to remove min_freq request: %d\n", err); > } > > if (devfreq->profile->exit) > Looks good to me. But, It doesn't contain the stable mailing list. Please add stable mailing list to Cc and resend it. -- Best Regards, Chanwoo Choi Samsung Electronics _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PM / devfreq: Fix handling dev_pm_qos_remove_request result 2020-03-12 3:30 ` Chanwoo Choi @ 2020-03-12 6:31 ` Dan Carpenter 0 siblings, 0 replies; 3+ messages in thread From: Dan Carpenter @ 2020-03-12 6:31 UTC (permalink / raw) To: Chanwoo Choi Cc: linux-pm, Viresh Kumar, Rafael J. Wysocki, Artur Świgoń, Krzysztof Kozlowski, Kyungmin Park, Matthias Kaehlcke, MyungJoo Ham, Leonard Crestez, Adam Ford, linux-arm-kernel, linux-imx On Thu, Mar 12, 2020 at 12:30:42PM +0900, Chanwoo Choi wrote: > On 3/12/20 12:15 PM, Leonard Crestez wrote: > > The dev_pm_qos_remove_request function can return 1 if > > "aggregated constraint value has changed" so only negative values should > > be reported as errors. > > > > Fixes: 27dbc542f651 ("PM / devfreq: Use PM QoS for sysfs min/max_freq") > > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Since you're resending anyway, could you remove the blank line after the Fixes tag? All the tags go together at the end. (The blank line does not matter at all to anyone, purely aesthetic). regards, dan carpenter _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-12 6:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20200312031520epcas1p3ae8085a7d85da5b41776136f61ad40a3@epcas1p3.samsung.com>
2020-03-12 3:15 ` [PATCH] PM / devfreq: Fix handling dev_pm_qos_remove_request result Leonard Crestez
2020-03-12 3:30 ` Chanwoo Choi
2020-03-12 6:31 ` Dan Carpenter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox