lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 Oct 2019 06:59:15 +0100
From:   Sudeep Holla <sudeep.holla@....com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     "Rafael J . Wysocki" <rjw@...ysocki.net>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, nico@...xnic.net
Subject: Re: [PATCH v2 5/5] cpufreq: vexpress-spc: fix some coding style
 issues

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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ