Message ID | ea4c8b53f2a045116a5f70e24374ce62c85f0b81.1583982882.git.leonard.crestez@nxp.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Chanwoo Choi |
Headers | show |
Series | PM / devfreq: Fix handling dev_pm_qos_remove_request result | expand |
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.
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
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)
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(-)