Linux Power Management development
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Stratos Karafotis <stratosk@semaphore.gr>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: Remove unnecessary braces
Date: Wed, 19 Mar 2014 23:45:35 +0100	[thread overview]
Message-ID: <93042283.W9rbzHbJB2@vostro.rjw.lan> (raw)
In-Reply-To: <532A0D0C.50507@semaphore.gr>

On Wednesday, March 19, 2014 11:33:00 PM Stratos Karafotis wrote:
> Remove 3 sets of unnecessary braces
> 
> Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
> ---
>  drivers/cpufreq/cpufreq.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 1eafd8c..ca3c01f 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1325,17 +1325,16 @@ static int __cpufreq_remove_dev_prepare(struct device *dev,
>  	cpus = cpumask_weight(policy->cpus);
>  	up_read(&policy->rwsem);
>  
> -	if (cpu != policy->cpu) {
> +	if (cpu != policy->cpu)
>  		sysfs_remove_link(&dev->kobj, "cpufreq");
> -	} else if (cpus > 1) {

These braces aren't in fact unnecessary, they are in accordance with CodingStyle.

> +	else if (cpus > 1) {
>  		new_cpu = cpufreq_nominate_new_policy_cpu(policy, cpu);
>  		if (new_cpu >= 0) {
>  			update_policy_cpu(policy, new_cpu);
>  
> -			if (!cpufreq_suspended) {
> +			if (!cpufreq_suspended)
>  				pr_debug("%s: policy Kobject moved to cpu: %d from: %d\n",
>  					 __func__, new_cpu, cpu);
> -			}
>  		}
>  	}
>  
> @@ -2158,11 +2157,9 @@ int cpufreq_update_policy(unsigned int cpu)
>  		if (!policy->cur) {
>  			pr_debug("Driver did not initialize current freq\n");
>  			policy->cur = new_policy.cur;
> -		} else {
> -			if (policy->cur != new_policy.cur && has_target())
> +		} else if (policy->cur != new_policy.cur && has_target())

And here too.

>  				cpufreq_out_of_sync(cpu, policy->cur,
>  								new_policy.cur);
> -		}
>  	}
>  
>  	ret = cpufreq_set_policy(policy, &new_policy);
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2014-03-19 22:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 21:33 [PATCH] cpufreq: Remove unnecessary braces Stratos Karafotis
2014-03-19 22:45 ` Rafael J. Wysocki [this message]
2014-03-19 23:25   ` Stratos Karafotis
2014-03-20  0:06     ` Viresh Kumar

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=93042283.W9rbzHbJB2@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=stratosk@semaphore.gr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox