All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Dirk Brandewie <dirk.brandewie@gmail.com>,
	Patrik Lundquist <patrik.lundquist@gmail.com>,
	"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: v3.13.5 intel_pstate: cpufreq: __cpufreq_add_dev: ->get() failed
Date: Wed, 12 Mar 2014 13:22:54 +0800	[thread overview]
Message-ID: <CAKohpokONW5Q2GqrvmKBh+NLSVA1RSZ_Fg+jKZQnReDXianvUg@mail.gmail.com> (raw)
In-Reply-To: <4501120.an62ETExKs@vostro.rjw.lan>

On 12 March 2014 07:53, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> Is having ->target set mutually exclusive with having ->setpolicy set?
>
> It is quite clear that having ->setpolicy implies having ->target unset,
> because both drivers with ->setpolicy (intel_pstate and longrun) don't
> have ->target set.
>
> Now, are there any *other* cpufreq drivers without ->target?
>
> In either case, in my opinion we should just make cpufreq_register_driver()
> fail for drivers having both ->set_policy and ->target set at the same time.
> Like in the patch below.
>
> Rafael
>
>
> ---
>  drivers/cpufreq/cpufreq.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> Index: linux-pm/drivers/cpufreq/cpufreq.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq.c
> +++ linux-pm/drivers/cpufreq/cpufreq.c
> @@ -2306,7 +2306,9 @@ int cpufreq_register_driver(struct cpufr
>
>         if (!driver_data || !driver_data->verify || !driver_data->init ||
>             !(driver_data->setpolicy || driver_data->target_index ||
> -                   driver_data->target))
> +                   driver_data->target) ||
> +            (driver_data->setpolicy && (driver_data->target_index ||
> +                   driver_data->target)))
>                 return -EINVAL;
>
>         pr_debug("trying to register driver %s\n", driver_data->name);

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

  reply	other threads:[~2014-03-12  5:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 15:49 v3.13.5 intel_pstate: cpufreq: __cpufreq_add_dev: ->get() failed Patrik Lundquist
2014-03-10  5:23 ` Viresh Kumar
2014-03-10 12:15   ` Patrik Lundquist
2014-03-11 17:58 ` Dirk Brandewie
2014-03-11 19:50   ` Rafael J. Wysocki
2014-03-11 20:08     ` Dirk Brandewie
2014-03-11 20:45       ` Rafael J. Wysocki
2014-03-12  5:21       ` Viresh Kumar
2014-03-12 11:09         ` Rafael J. Wysocki
2014-03-11 20:20   ` Rafael J. Wysocki
2014-03-11 20:17     ` Dirk Brandewie
2014-03-11 20:52       ` Rafael J. Wysocki
2014-03-11 20:57         ` Rafael J. Wysocki
2014-03-11 20:55           ` Dirk Brandewie
2014-03-11 22:48             ` Rafael J. Wysocki
2014-03-11 23:07               ` Rafael J. Wysocki
2014-03-11 23:09                 ` Rafael J. Wysocki
2014-03-11 23:53                   ` Rafael J. Wysocki
2014-03-12  5:22                     ` Viresh Kumar [this message]
2014-03-12 11:42                 ` Patrik Lundquist
2014-03-12 13:27                   ` Rafael J. Wysocki
2014-03-12 14:14                   ` Patrik Lundquist
2014-03-12 23:30                     ` [PATCH] cpufreq: Skip current frequency initialization for ->setpolicy drivers Rafael J. Wysocki
2014-03-12 23:30                       ` Dirk Brandewie
2014-03-18 11:53                       ` Srivatsa S. Bhat
2014-03-12  5:25           ` v3.13.5 intel_pstate: cpufreq: __cpufreq_add_dev: ->get() failed Viresh Kumar
2014-03-12 11:03             ` Rafael J. Wysocki
2014-03-11 22:07   ` Patrik Lundquist

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=CAKohpokONW5Q2GqrvmKBh+NLSVA1RSZ_Fg+jKZQnReDXianvUg@mail.gmail.com \
    --to=viresh.kumar@linaro.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=dirk.brandewie@gmail.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=patrik.lundquist@gmail.com \
    --cc=rjw@rjwysocki.net \
    /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: link
Be 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.