All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: rafael.j.wysocki@intel.com, lenlenb@kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/3] cpufreq: intel_pstate: wrong flag checking for no_acpi_perf
Date: Fri, 13 Nov 2015 16:35:54 -0800	[thread overview]
Message-ID: <1447461354.3190.0.camel@linux.intel.com> (raw)
In-Reply-To: <2898952.tN20UOVv0J@vostro.rjw.lan>

On Sat, 2015-11-14 at 01:46 +0100, Rafael J. Wysocki wrote:
> On Monday, November 09, 2015 06:58:10 PM Srinivas Pandruvada wrote:
> > The checking of no_acpi_perf flag is wrong. Since there is null
> > check in acpi_processor_unregister_performance this doesn't cause
> > any issue when this flag is 0.
> > 
> > Signed-off-by: Srinivas Pandruvada <
> > srinivas.pandruvada@linux.intel.com>
> > ---
> >  drivers/cpufreq/intel_pstate.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/cpufreq/intel_pstate.c
> > b/drivers/cpufreq/intel_pstate.c
> > index a0b8180..69dc9b5 100644
> > --- a/drivers/cpufreq/intel_pstate.c
> > +++ b/drivers/cpufreq/intel_pstate.c
> > @@ -328,7 +328,7 @@ static int intel_pstate_exit_perf_limits(struct
> > cpufreq_policy *policy)
> >  {
> >  	struct cpudata *cpu;
> >  
> > -	if (!no_acpi_perf)
> > +	if (no_acpi_perf)
> >  		return 0;
> >  
> >  	cpu = all_cpu_data[policy->cpu];
> 
> While the patch is correct, the changelog doesn't make a lot of sense
> to me
> to be honest.
> 
> In addition to that, the cpu variable here is actually not used, so
> what
> about doing something like the below instead here?
Sure, I will resubmit this.

Thanks,
Srinivas

---
>  drivers/cpufreq/intel_pstate.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> Index: linux-pm/drivers/cpufreq/intel_pstate.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/intel_pstate.c
> +++ linux-pm/drivers/cpufreq/intel_pstate.c
> @@ -326,13 +326,9 @@ static int intel_pstate_init_perf_limits
>  
>  static int intel_pstate_exit_perf_limits(struct cpufreq_policy
> *policy)
>  {
> -	struct cpudata *cpu;
> -
>  	if (!no_acpi_perf)
> -		return 0;
> +		acpi_processor_unregister_performance(policy->cpu);
>  
> -	cpu = all_cpu_data[policy->cpu];
> -	acpi_processor_unregister_performance(policy->cpu);
>  	return 0;
>  }
>  
> 

  reply	other threads:[~2015-11-14  0:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  2:58 [PATCH 0/3] Intel Pstate: ACPI perf integration issues Srinivas Pandruvada
2015-11-10  2:58 ` [PATCH 1/3] cpufreq: intel_pstate: Don't use ACPI perf for HWP Srinivas Pandruvada
2015-11-14  0:44   ` Rafael J. Wysocki
2015-11-10  2:58 ` [PATCH 2/3] cpufreq: intel_pstate: wrong flag checking for no_acpi_perf Srinivas Pandruvada
2015-11-14  0:46   ` Rafael J. Wysocki
2015-11-14  0:35     ` Srinivas Pandruvada [this message]
2015-11-10  2:58 ` [PATCH 3/3] cpufreq: intel_pstate: Fix the scaling of _PSS entry[0] Srinivas Pandruvada
2015-11-14  0:45   ` 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=1447461354.3190.0.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=lenlenb@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.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.