From: Josh Law <hlcj1234567@gmail.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Josh Law <objecting@objecting.org>
Subject: Re: [PATCH 4/4] arm64: kernel: Fix style in io.c macro
Date: Mon, 2 Mar 2026 18:21:20 +0000 [thread overview]
Message-ID: <1a19899b-862b-477f-8314-4821ac6b8716@gmail.com> (raw)
In-Reply-To: <aaXSGSEY_3WQvjYS@J2N7QTR9R3>
2 Mar 2026 18:08:29 Mark Rutland <mark.rutland@arm.com>:
> On Mon, Mar 02, 2026 at 03:45:16PM +0000, Josh Law wrote:
>> 2 Mar 2026 14:51:19 Mark Rutland <mark.rutland@arm.com>:
>>
>>> On Sun, Mar 01, 2026 at 12:34:07AM +0000, Josh Law wrote:
>>>> Signed-off-by: Josh Law <objecting@objecting.org>
>>>> ---
>>>> 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.
Sorry Mark, I'm sure I'll do a real useful patch to you very soon
V/R
next prev parent reply other threads:[~2026-03-02 18:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-01 0:34 [PATCH 1/4] arm64: errata: Fix missing space after comma Josh Law
2026-03-01 0:34 ` [PATCH 2/4] arm64: fpsimd: make stack ctl_table const Josh Law
2026-03-01 0:34 ` [PATCH 3/4] arm64: kernel: Move const after static in get_kaslr_seed Josh Law
2026-03-01 0:34 ` [PATCH 4/4] arm64: kernel: Fix style in io.c macro Josh Law
2026-03-02 14:51 ` Mark Rutland
2026-03-02 15:45 ` Josh Law
2026-03-02 18:08 ` Mark Rutland
2026-03-02 18:21 ` Josh Law [this message]
2026-03-03 11:50 ` [PATCH 1/4] arm64: errata: Fix missing space after comma Will Deacon
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=1a19899b-862b-477f-8314-4821ac6b8716@gmail.com \
--to=hlcj1234567@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=objecting@objecting.org \
--cc=will@kernel.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
all inboxes | Powered by JetHome®