Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1749167ybg; Sat, 19 Oct 2019 01:40:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbK6AKh8B3skpr1Brv+FD24txkO/qkozgo/trZcI/o+5J8xIz2XkEEgz+e5acSnWNeqHwL X-Received: by 2002:a17:907:2172:: with SMTP id rl18mr12611391ejb.125.1571474419606; Sat, 19 Oct 2019 01:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571474419; cv=none; d=google.com; s=arc-20160816; b=obhDDOJUMnV/xK5oJxkQKDGWHcANHyW99Ch8KoQx/bkqc0ZGCvEfv6WQRNZpkjdFRu 2QJzlfUNdP4gHhI1stXpFDxUITvTO5vzkFCjFJOpDPkF4+8PyyGVMZxuMKvNQ8GwDD+1 dGHql7HCCK5NPmNF/NsxBtcI6jwn0eCMgkIBq3KLHt2dsXHYy83MTZWVUfjq1qbf2Q0c QHNzUrkJukx1wvFMvsELLc4sie7XaiSreYf61rhCeBvIo7filLkxd0/6StCfq2qhx5oK GdRv8pbahbesMfVS4roPZpWzCea9H4MF9DKwhOwx9sH4fCTCQsFDsGClAA0a2XOiKBsJ R7Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=bh4YL6imf5CoGkXUAp/gI0U0FITFELEaS5rGtgLbRdI=; b=SYbCfSxtq1XMVN93+N8tnBFnG11pf4RWrGK4i7GAlnEAZQf21Z6PIT3MhKJwiHArP5 sJhW5+ZkNaEH/l8KPjqJC31OTiPvMtSSKF841BCGWRiBSGk3Kh8fUwJGS/R5zsWRtmJs wU4HxtIloUdOc7sSZErqsRDGZp4x0ukXpNwiAgWABf1blaCiDe/PJyw6GnbbwKr/vV8D AjHgl3K52rFBOUEIv4leqKLfR8tj462tw6A97QHuOH0f1XkaKPhlWPU/4WPqoSltOKbN WwT3STPVs3fzAnOjOo6N+8poZIYmllaY80M8TmXbTrfJOR3r3LCd8mPAXGCEnDQgvWiM eY7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b="MgdHg/sA"; dkim=temperror (no key for signature) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=YnEBUk0H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si1086596eja.141.2019.10.19.01.39.56; Sat, 19 Oct 2019 01:40:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b="MgdHg/sA"; dkim=temperror (no key for signature) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=YnEBUk0H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406307AbfJRPvr (ORCPT + 99 others); Fri, 18 Oct 2019 11:51:47 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:59693 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389072AbfJRPvq (ORCPT ); Fri, 18 Oct 2019 11:51:46 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 066D59AE61; Fri, 18 Oct 2019 11:51:42 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=SVptdQAfzrpdqaplm7DrQ1F74hE=; b=MgdHg/ sAhMWyrnCJ8qmhPjmlwSTs0wPatNyIi4eCqUdzNdsMTUBtjg8IYEk8jVNKvGCApU Ha3+te3OKjBy1PL42BFW7ewMgpRVaG30RzBRba4O990XwlFLRcRzORyc1nZxvyk2 fWB8RxvODkhGa3pDZTm5Itq3G4Lx847JfbBb8= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id F1D979AE60; Fri, 18 Oct 2019 11:51:41 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=Gr5XnOBIp4yLgJQ+v2m19BlmLPGN4f/f+xphdBLskqQ=; b=YnEBUk0HVY7DEWUFjLhJ+O4U9CXvOoHtqykFbxQONMjfo+ZzIFeCxpEfI8PfeTU5ugFYd2RKPNpE9FabYcAbfG6d7/oNAoIvyrM9ygQkTq45hlOOHRZJIk7BjiR4sFZgsJaDE+HK9wXqwb6Ci4CI1nZO/Bfiz4iaefDm6e459Ec= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id E07DD9AE5E; Fri, 18 Oct 2019 11:51:38 -0400 (EDT) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 0BCAD2DA017D; Fri, 18 Oct 2019 11:51:37 -0400 (EDT) Date: Fri, 18 Oct 2019 11:51:36 -0400 (EDT) From: Nicolas Pitre To: Sudeep Holla cc: Viresh Kumar , "Rafael J . Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 5/5] cpufreq: vexpress-spc: fix some coding style issues In-Reply-To: <20191018055915.GD31836@e107533-lin.cambridge.arm.com> Message-ID: References: <20191017123508.26130-1-sudeep.holla@arm.com> <20191017123508.26130-6-sudeep.holla@arm.com> <20191018055517.dxyx4ara7hdmzw5j@vireshk-i7> <20191018055915.GD31836@e107533-lin.cambridge.arm.com> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Pobox-Relay-ID: 2BEA692A-F1BF-11E9-A463-8D86F504CC47-78420484!pb-smtp21.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Oct 2019, Sudeep Holla wrote: > 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 > > > --- > > > 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 :) In cases like this one, the best is to go with whatever makes checkpatch happy. Nicolas