From: Sudeep Holla <sudeep.holla@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
nico@fluxnic.net
Subject: Re: [PATCH v2 5/5] cpufreq: vexpress-spc: fix some coding style issues
Date: Fri, 18 Oct 2019 06:59:15 +0100 [thread overview]
Message-ID: <20191018055915.GD31836@e107533-lin.cambridge.arm.com> (raw)
In-Reply-To: <20191018055517.dxyx4ara7hdmzw5j@vireshk-i7>
On Fri, Oct 18, 2019 at 11:25:17AM +0530, Viresh Kumar wrote:
> On 17-10-19, 13:35, Sudeep Holla wrote:
> > Fix the following checkpatch checks/warnings:
> >
> > CHECK: Unnecessary parentheses around the code
> > CHECK: Alignment should match open parenthesis
> > CHECK: Prefer kernel type 'u32' over 'uint32_t'
> > WARNING: Missing a blank line after declarations
> >
> > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > ---
> > drivers/cpufreq/vexpress-spc-cpufreq.c | 43 ++++++++++++--------------
> > 1 file changed, 20 insertions(+), 23 deletions(-)
> >
> > diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c
> > index 81064430317f..8ecb2961be86 100644
> > --- a/drivers/cpufreq/vexpress-spc-cpufreq.c
> > +++ b/drivers/cpufreq/vexpress-spc-cpufreq.c
> > @@ -79,8 +79,8 @@ static unsigned int find_cluster_maxfreq(int cluster)
> > for_each_online_cpu(j) {
> > cpu_freq = per_cpu(cpu_last_req_freq, j);
> >
> > - if ((cluster == per_cpu(physical_cluster, j)) &&
> > - (max_freq < cpu_freq))
> > + if (cluster == per_cpu(physical_cluster, j) &&
> > + max_freq < cpu_freq)
> > max_freq = cpu_freq;
> > }
> >
> > @@ -188,22 +188,19 @@ static int ve_spc_cpufreq_set_target(struct cpufreq_policy *policy,
> > freqs_new = freq_table[cur_cluster][index].frequency;
> >
> > if (is_bL_switching_enabled()) {
> > - if ((actual_cluster == A15_CLUSTER) &&
> > - (freqs_new < clk_big_min)) {
> > + if (actual_cluster == A15_CLUSTER && freqs_new < clk_big_min)
> > new_cluster = A7_CLUSTER;
> > - } else if ((actual_cluster == A7_CLUSTER) &&
> > - (freqs_new > clk_little_max)) {
> > + else if (actual_cluster == A7_CLUSTER &&
> > + freqs_new > clk_little_max)
> > new_cluster = A15_CLUSTER;
> > - }
> > }
> >
> > ret = ve_spc_cpufreq_set_rate(cpu, actual_cluster, new_cluster,
> > freqs_new);
> >
> > - if (!ret) {
> > + if (!ret)
>
> That's not the standard way in Linux I believe. We do use {} even when
> the body is single line but broken into two, like below.
>
OK, wasn't aware of that. I will update. Generally I ignore checkpatch
warnings, but the list was big and fixed a bunch of them :)
--
Regards,
Sudeep
next prev parent reply other threads:[~2019-10-18 5:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 12:35 [PATCH v2 0/5] cpufreq: merge arm big.LITTLE and vexpress-spc drivers Sudeep Holla
2019-10-17 12:35 ` [PATCH v2 1/5] cpufreq: scpi: remove stale/outdated comment about the driver Sudeep Holla
2019-10-17 12:35 ` [PATCH v2 2/5] cpufreq: merge arm_big_little and vexpress-spc Sudeep Holla
2019-10-18 5:47 ` Viresh Kumar
2019-10-18 5:50 ` Sudeep Holla
2019-10-17 12:35 ` [PATCH v2 3/5] cpufreq: vexpress-spc: drop unnessary cpufreq_arm_bL_ops abstraction Sudeep Holla
2019-10-17 12:35 ` [PATCH v2 4/5] cpufreq: vexpress-spc: remove lots of debug messages Sudeep Holla
2019-10-18 5:57 ` Viresh Kumar
2019-10-18 6:00 ` Sudeep Holla
2019-10-17 12:35 ` [PATCH v2 5/5] cpufreq: vexpress-spc: fix some coding style issues Sudeep Holla
2019-10-18 5:55 ` Viresh Kumar
2019-10-18 5:59 ` Sudeep Holla [this message]
2019-10-18 15:51 ` Nicolas Pitre
2019-10-17 16:54 ` [PATCH v2 0/5] cpufreq: merge arm big.LITTLE and vexpress-spc drivers Nicolas Pitre
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=20191018055915.GD31836@e107533-lin.cambridge.arm.com \
--to=sudeep.holla@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nico@fluxnic.net \
--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;
as well as URLs for NNTP newsgroup(s).