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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Oct 2017 11:22:18 +0000
From:   MyungJoo Ham <myungjoo.ham@...sung.com>
To:     Chanwoo Choi <cw00.choi@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>
CC:     "rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
        "chanwoo@...nel.org" <chanwoo@...nel.org>,
        Inki Dae <inki.dae@...sung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: FW: RE: [PATCH v3 1/8] PM / devfreq: Set min/max_freq when adding
 the devfreq device

> > Prior to that, the min/max_freq of the devfreq device are always zero
> > before the user changes the min/max_freq through sysfs entries.
> > It might make the confusion for the min/max_freq.
> > 
> > This patch initializes the available min/max_freq by using the OPP
> > during adding the devfreq device.
> > 
> > Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
> > ---
> >  drivers/devfreq/devfreq.c | 43 +++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 43 insertions(+)
> > 
> > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> > index a1c4ee818614..ae8717a6eee1 100644
> > --- a/drivers/devfreq/devfreq.c
> > +++ b/drivers/devfreq/devfreq.c
> > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> > index a1c4ee818614..ae8717a6eee1 100644
> > --- a/drivers/devfreq/devfreq.c
> > +++ b/drivers/devfreq/devfreq.c
> > @@ -69,6 +69,34 @@ static struct devfreq *find_device_devfreq(struct device *dev)
> >  	return ERR_PTR(-ENODEV);
> >  }
> >  
> > +static unsigned long find_available_min_freq(struct devfreq *devfreq)
> > +{
> > +	struct dev_pm_opp *opp;
> > +	unsigned long min_freq = 0;
> > +
> > +	opp = dev_pm_opp_find_freq_ceil(devfreq->dev.parent, &min_freq);
> 
> When min_freq is 0, dev_pm_opp_find_freq_ceil will return ERR_PTR(-EINVAL);
> 
> --- from drivers/base/power/opp/core.c ------ 
> struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
>                                              unsigned long *freq)
> {
>         struct opp_table *opp_table;
>         struct dev_pm_opp *opp;
> 
>         if (!dev || !freq) {
>                 dev_err(dev, "%s: Invalid argument freq=%p\n", __func__, freq);
>                 return ERR_PTR(-EINVAL);
>         }
> ---------------------------------------------

Sorry, please never mind. My Bad. Your code had no such issues.

So, I'm adding:
Acked-by: MyungJoo Ham <myungjoo.ham@...sung.com>

> 
> Cheers,
> MyungJoo
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ