From: Stratos Karafotis <stratosk@semaphore.gr>
To: Joe Perches <joe@perches.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
Dirk Brandewie <dirk.j.brandewie@intel.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/7] cpufreq: intel_pstate: Trivial code cleanup
Date: Tue, 10 Jun 2014 17:43:23 +0300 [thread overview]
Message-ID: <5397198B.7070407@semaphore.gr> (raw)
In-Reply-To: <1402348962.3142.32.camel@joe-AO725>
On 10/06/2014 12:22 πμ, Joe Perches wrote:
> On Tue, 2014-06-10 at 00:01 +0300, Stratos Karafotis wrote:
>> Remove unnecessary braces.
>
> []
>
>> @@ -204,20 +203,16 @@ static inline void intel_pstate_busy_pid_reset(struct cpudata *cpu)
>
>> static inline void intel_pstate_reset_all_pid(void)
>> {
>> unsigned int cpu;
>> - for_each_online_cpu(cpu) {
>> +
>> + for_each_online_cpu(cpu)
>> if (all_cpu_data[cpu])
>> intel_pstate_busy_pid_reset(all_cpu_data[cpu]);
>> - }
>
> It's pretty traditional to keep the braces here
> as it generally makes it clearer for the reader.
>
> for (...) {
> if (foo)
> bar();
> }
>
> is generally used over
>
> for (...)
> if (foo)
> bar();
>
> Just like using
>
> if (foo) {
> /* commment */
> bar();
> }
OK, I will revert these changes in v2.
>> @@ -748,15 +744,14 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
> []
>> - pr_info("Intel pstate controlling: cpu %d\n", cpunum);
>> + pr_info("Intel pstate controlling: CPU %d\n", cpunum);
>
> cpu is very slightly preferred lower case.
>
> $ git grep -E -i '^[^"]*"[^"]*\bcpu\b'|grep -w -i -o cpu | sort |uniq -c | sort -rn
> 2705 cpu
> 2084 CPU
> 17 Cpu
>
Although, I believe that the term 'CPU' is more appropriate, I'll revert this
as the majority and Dirk prefer it. :)
Thanks for your comments!
Stratos
next prev parent reply other threads:[~2014-06-10 14:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 21:01 [PATCH 6/7] cpufreq: intel_pstate: Trivial code cleanup Stratos Karafotis
2014-06-09 21:22 ` Joe Perches
2014-06-10 14:43 ` Stratos Karafotis [this message]
2014-06-10 15:12 ` Dirk Brandewie
2014-06-10 15:31 ` Rafael J. Wysocki
2014-06-10 17:26 ` Dirk Brandewie
2014-06-10 20:17 ` Rafael J. Wysocki
2014-06-10 20:14 ` Stratos Karafotis
2014-06-10 20:43 ` Rafael J. Wysocki
2014-06-10 21:02 ` Stratos Karafotis
2014-06-10 21:38 ` Rafael J. Wysocki
2014-06-10 21:26 ` Joe Perches
2014-06-11 0:23 ` Rafael J. Wysocki
2014-06-11 1:41 ` Joe Perches
2014-06-10 21:35 ` Stratos Karafotis
2014-06-11 0:24 ` 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=5397198B.7070407@semaphore.gr \
--to=stratosk@semaphore.gr \
--cc=dirk.j.brandewie@intel.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--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