From: Markus Elfring <Markus.Elfring@web.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>, sparclinux@vger.kernel.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Andreas Larsson <andreas@gaisler.com>,
Christoph Lameter <cl@linux.com>,
"David S. Miller" <davem@davemloft.net>,
Finn Thain <fthain@linux-m68k.org>, Tejun Heo <tj@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Miaoqian Lin <linmq006@gmail.com>
Subject: Re: [PATCH] sparc: time: Use pointer from memcpy() call for assignment in setup_sparc64_timer()
Date: Fri, 31 Oct 2025 09:46:25 +0100 [thread overview]
Message-ID: <33199802-d83d-48e8-9032-f1c4c61cfee7@web.de> (raw)
In-Reply-To: <CAMuHMdX-uKt3-Lb2NaxmONEqWdtFgTOqXEo1nOfGq-R8ysHfcQ@mail.gmail.com>
…>> +++ b/arch/sparc/kernel/time_64.c
>> @@ -760,9 +760,7 @@ void setup_sparc64_timer(void)
>> : /* no outputs */
>> : "r" (pstate));
>>
>> - sevt = this_cpu_ptr(&sparc64_events);
>> -
>> - memcpy(sevt, &sparc64_clockevent, sizeof(*sevt));
>> + sevt = memcpy(this_cpu_ptr(&sparc64_events), &sparc64_clockevent, sizeof(*sevt));
>
> IMHO this makes the code harder to read:
> - Only 0.15% of the memcpy() calls in the kernel use the
> memcpy() chaining feature,
I obviously propose to refactor this implementation detail.
> - The line is now longer than the 80-character limit, which is still
> customary for this file.
Would you like to get a subsequent patch variant?
Regards,
Markus
next prev parent reply other threads:[~2025-10-31 8:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 7:46 Markus Elfring
2025-10-31 8:01 ` Geert Uytterhoeven
2025-10-31 8:46 ` Markus Elfring [this message]
2025-10-31 9:51 ` David Laight
2025-10-31 10:08 ` Geert Uytterhoeven
2025-10-31 11:27 ` Dan Carpenter
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=33199802-d83d-48e8-9032-f1c4c61cfee7@web.de \
--to=markus.elfring@web.de \
--cc=alexandre.belloni@bootlin.com \
--cc=andreas@gaisler.com \
--cc=cl@linux.com \
--cc=davem@davemloft.net \
--cc=fthain@linux-m68k.org \
--cc=geert@linux-m68k.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=tj@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®