From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B824317172 for ; Mon, 2 Mar 2026 18:08:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772474911; cv=none; b=MhODynPJd9StguTBEoeF26bDHXcxqQHLCe994Y838r1cq3bWoDaSYjw09EIVPFdnbKNbkG2c3g1nMM/TXrh/110u1grXXGqX4zxjzfvtjEBNaLPZIhfq0O+YZhCeJWl9YyixX0sI3q8Samn1Y3WkWH5ACbUafen8RQIptNBDu10= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772474911; c=relaxed/simple; bh=akCUG0FwLZRQELpjQnc1FGPnJ2QFPllJoPxSJXREFpQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SZRQ1i6tQdIMrchOc7K69etIr3bN0LAaZBtdSFXBVng1w3g71TFMthLuO/fIoSsmVVm5xtPW5fsUdJheV0skTIXGQhV3GBBfB0xKtqec9sl/hPHmxy2KMKAJ/McXBkh8GnJaJx5cG2JdsG2+/kAEHgM2ZBp/sngGUR1TWUmjvrg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 2663A14BF; Mon, 2 Mar 2026 10:08:23 -0800 (PST) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2B7B43F694; Mon, 2 Mar 2026 10:08:28 -0800 (PST) Date: Mon, 2 Mar 2026 18:08:25 +0000 From: Mark Rutland To: Josh Law Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Josh Law Subject: Re: [PATCH 4/4] arm64: kernel: Fix style in io.c macro Message-ID: References: <20260301003407.2493781-1-objecting@objecting.org> <20260301003407.2493781-4-objecting@objecting.org> <3fe578cc-07b3-442b-8eca-1f94c1975e85@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3fe578cc-07b3-442b-8eca-1f94c1975e85@gmail.com> On Mon, Mar 02, 2026 at 03:45:16PM +0000, Josh Law wrote: > 2 Mar 2026 14:51:19 Mark Rutland : > > > On Sun, Mar 01, 2026 at 12:34:07AM +0000, Josh Law wrote: > >> Signed-off-by: Josh Law > >> --- > >> arch/arm64/kernel/io.c | 6 +++--- > >> 1 file changed, 3 insertions(+), 3 deletions(-) > >> > >> diff --git a/arch/arm64/kernel/io.c b/arch/arm64/kernel/io.c > >> index fe86ada23c7d..ce27fa5d2e37 100644 > >> --- a/arch/arm64/kernel/io.c > >> +++ b/arch/arm64/kernel/io.c > >> @@ -17,10 +17,10 @@ > >> #define memcpy_toio_aligned(to, from, count, bits)                        \ > >>     ({                                                                \ > >>         volatile u##bits __iomem *_to = to;                       \ > >> -       const u##bits *_from = from;                              \ > >> +       const u##bits * _from = from;                             \ > >>         size_t _count = count;                                    \ > >> -       const u##bits *_end_from = _from + ALIGN_DOWN(_count, 8); \ > >> -                                                                          \ > >> +       const u##bits * _end_from = _from + ALIGN_DOWN(_count, 8);\ > >> +\ > > > > There is no style violation here. There's no need to add a space between > > '*' and the variable name. > > > > Mark. > > I used checkpatch.pl... it detected that So? Tools can be wrong. In general, checkpatch.pl shouldn't be applied to existing files to find issues, since there are many deliberate violations, and cases it cannot parse correctly. I checked out v7.0-rc2, and ran: ./scripts/checkpatch.pl -f arch/arm64/kernel/io.c ... and the warning you see seems to be: | ERROR: need consistent spacing around '*' (ctx:WxV) | #20: FILE: arch/arm64/kernel/io.c:20: | + const u##bits *_from = from; \ | ^ >From a quick scan of checkpatch.pl, that's because it has mis-parsed this as a binary operator, where we *do* want consistent space around the '*'. For types that's not the case, e.g. | [mark@lakrids:~/src/linux]% cat test.c | int *foo = 1; | | int * bar = 1; | [mark@lakrids:~/src/linux]% ./scripts/checkpatch.pl -f test.c | WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 | #1: FILE: test.c:1: | +int *foo = 1; | | ERROR: "foo * bar" should be "foo *bar" | #3: FILE: test.c:3: | +int * bar = 1; Mark.