Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp212707pxb; Wed, 3 Feb 2021 03:47:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5HKt1TVUjfpVn1ku+Z2hWp73uZfdVU3Hv8yXsIApZHrGpZwgK/gNZgNGxX9cSSxwukUh1 X-Received: by 2002:aa7:ce93:: with SMTP id y19mr2398130edv.119.1612352836496; Wed, 03 Feb 2021 03:47:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612352836; cv=none; d=google.com; s=arc-20160816; b=u+ly0Ma1bKTwuux4nEawy59J7ArfPfPpFyQ2VkcKIxaWABEqjBIPeQ5b3HK00CyYo/ nQdFXNkLSQjZrx787pcLxcKv/YQvs9nnm1NYN+1DFipTKClxsxVVYWS6aNiwwuxhsRKI g9Jeonq75ceCFh/J3Mc57IivjRkk3irAr6P1/VBey8O98LeilqMFaAKXAu60hhpQXa4L BBApdqA9UnrzxexS0E1TNyyFRD0cPFo7tOCINWDcRicXmeSvOz8Vv0OysVAg1eCcnwWA oOdVDNdzFHbLsulx7IouFbL7k0r7dzgJAMuijBLnB9X01tbt2vT3iUmcBNEwLPXKzak1 scBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Rq+1kIFT/BGCA30CACF1EIigwpkGozPjHZ1xY97nou4=; b=Plilxacoh+x84bWyvmvBJp2gg2HJ6JaTgnl6Wbq1pq2FcTqRnXvggskUKpKSPANeey SF+K0TmVto5jm+UimdSl6BstHJ0zaOTuUR12O0XmOUcutcDGnXuUEsJaBKRFJACWdcq/ bSGms+2Be4I3VNseFoxq/eDGg1Jf1TQ3xx1o2WyDm8S0nDSk+OEspOPiMnN2z1AKzGd7 Gk8zuEQfUfmAXX0wxHrRckMOPPD9Uwbb47q2wr31y7tB8aVRh8qDkrdTGmoQfk5dkuHg sY57mCUkMKJu579a7246zMT2aDUu0RvwKEmaHyFccvtLhbCzeqPdHJG+VyBRticAMCoc vODg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si1009469edo.283.2021.02.03.03.46.52; Wed, 03 Feb 2021 03:47:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233972AbhBCLnP (ORCPT + 99 others); Wed, 3 Feb 2021 06:43:15 -0500 Received: from foss.arm.com ([217.140.110.172]:38462 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234461AbhBCLmu (ORCPT ); Wed, 3 Feb 2021 06:42:50 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 23E9ED6E; Wed, 3 Feb 2021 03:42:04 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.11.206]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C57863F719; Wed, 3 Feb 2021 03:42:01 -0800 (PST) Date: Wed, 3 Feb 2021 11:41:58 +0000 From: Mark Rutland To: Zhiyuan Dai Cc: catalin.marinas@arm.com, will@kernel.org, ardb@kernel.org, jeyu@kernel.org, keescook@chromium.org, vincenzo.frascino@arm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] arm64/kernel: improve the coding style Message-ID: <20210203114158.GD55896@C02TD0UTHF1T.local> References: <1612331299-21127-1-git-send-email-daizhiyuan@phytium.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1612331299-21127-1-git-send-email-daizhiyuan@phytium.com.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 01:48:19PM +0800, Zhiyuan Dai wrote: > Just improve the coding style. > > Signed-off-by: Zhiyuan Dai This is terse and doesn't tell the reader what to expect. It would be better to say something more specific, e.g. | arm64: improve whitespace | | In a few places we don't have whitespace between macro parameters, | which makes them hard to read. This patch adds whitespace to clearly | separate the parameters. | | In a few places we have unnecessary whitespace around unary operators, | which is confusing, This patch removes the unnecessary whitespace. ... which more clearly justifies the change. The patch itself looks sane to me (and the unary operator cleanup is certianly nice), so with that wording: Acked-by: Mark Rutland Thanks, Mark. > --- > arch/arm64/kernel/alternative.c | 2 +- > arch/arm64/kernel/module-plts.c | 2 +- > arch/arm64/kernel/perf_event.c | 2 +- > arch/arm64/kernel/process.c | 4 ++-- > 4 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c > index a57cffb..1184c44 100644 > --- a/arch/arm64/kernel/alternative.c > +++ b/arch/arm64/kernel/alternative.c > @@ -17,7 +17,7 @@ > #include > #include > > -#define __ALT_PTR(a,f) ((void *)&(a)->f + (a)->f) > +#define __ALT_PTR(a, f) ((void *)&(a)->f + (a)->f) > #define ALT_ORIG_PTR(a) __ALT_PTR(a, orig_offset) > #define ALT_REPL_PTR(a) __ALT_PTR(a, alt_offset) > > diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c > index 2e22443..e53493d 100644 > --- a/arch/arm64/kernel/module-plts.c > +++ b/arch/arm64/kernel/module-plts.c > @@ -131,7 +131,7 @@ u64 module_emit_veneer_for_adrp(struct module *mod, Elf64_Shdr *sechdrs, > } > #endif > > -#define cmp_3way(a,b) ((a) < (b) ? -1 : (a) > (b)) > +#define cmp_3way(a, b) ((a) < (b) ? -1 : (a) > (b)) > > static int cmp_rela(const void *a, const void *b) > { > diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c > index 3605f77a..d1fec4a 100644 > --- a/arch/arm64/kernel/perf_event.c > +++ b/arch/arm64/kernel/perf_event.c > @@ -810,7 +810,7 @@ static int armv8pmu_get_single_idx(struct pmu_hw_events *cpuc, > { > int idx; > > - for (idx = ARMV8_IDX_COUNTER0; idx < cpu_pmu->num_events; idx ++) { > + for (idx = ARMV8_IDX_COUNTER0; idx < cpu_pmu->num_events; idx++) { > if (!test_and_set_bit(idx, cpuc->used_mask)) > return idx; > } > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c > index 6616486..4cc1ccc 100644 > --- a/arch/arm64/kernel/process.c > +++ b/arch/arm64/kernel/process.c > @@ -304,7 +304,7 @@ void __show_regs(struct pt_regs *regs) > } > } > > -void show_regs(struct pt_regs * regs) > +void show_regs(struct pt_regs *regs) > { > __show_regs(regs); > dump_backtrace(regs, NULL, KERN_DEFAULT); > @@ -587,7 +587,7 @@ unsigned long get_wchan(struct task_struct *p) > ret = frame.pc; > goto out; > } > - } while (count ++ < 16); > + } while (count++ < 16); > > out: > put_task_stack(p); > -- > 1.8.3.1 >