All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>,
	Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH V2 1/2] ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START
Date: Mon, 30 Jan 2017 08:07:01 +0100	[thread overview]
Message-ID: <CAJZ5v0i2SW9+T-RbegaoFu0xuN473BZ25iQdwU=gPrOvRW60EQ@mail.gmail.com> (raw)
In-Reply-To: <e608c76ea40e4f0d50bfe821174dfebef924e35b.1485750547.git.viresh.kumar@linaro.org>

On Mon, Jan 30, 2017 at 5:29 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> acpi_processor_ppc_notifier() can live without using CPUFREQ_START
> (which is gonna be removed soon), as it is only used while setting
> ignore_ppc to 0. This can be done with the help of "ignore_ppc < 0"
> check alone. The notifier function anyway ignores all events except
> CPUFREQ_ADJUST and dropping CPUFREQ_START wouldn't harm at all.
>
> Once CPUFREQ_START event is removed from the cpufreq core,
> acpi_processor_ppc_notifier() will get called only for CPUFREQ_NOTIFY or
> CPUFREQ_ADJUST event. Drop the return statement from the first if block
> to make sure we don't ignore any such events.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> ---
> V1->V2:
> - Improved changelog
> - Don't move the first if block to a later point, as it becomes useless
>   then.
> ---
>  drivers/acpi/processor_perflib.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
> index f0b4a981b8d3..18b72eec3507 100644
> --- a/drivers/acpi/processor_perflib.c
> +++ b/drivers/acpi/processor_perflib.c
> @@ -75,10 +75,8 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb,
>         struct acpi_processor *pr;
>         unsigned int ppc = 0;
>
> -       if (event == CPUFREQ_START && ignore_ppc <= 0) {
> +       if (ignore_ppc < 0)
>                 ignore_ppc = 0;
> -               return 0;
> -       }

Don't we want to return from here if ignore_ppc is 0?

>
>         if (ignore_ppc)
>                 return 0;
> --

Thanks,
Rafael

  reply	other threads:[~2017-01-30  7:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05  6:04 [PATCH 1/2] ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START Viresh Kumar
2017-01-05  6:04 ` [PATCH 2/2] cpufreq: Remove CPUFREQ_START notifier event Viresh Kumar
2017-01-28 11:32 ` [PATCH 1/2] ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START Rafael J. Wysocki
2017-01-30  4:29   ` [PATCH V2 " Viresh Kumar
2017-01-30  7:07     ` Rafael J. Wysocki [this message]
2017-01-30  7:49       ` Rafael J. Wysocki

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='CAJZ5v0i2SW9+T-RbegaoFu0xuN473BZ25iQdwU=gPrOvRW60EQ@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@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: 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.