Re: [PATCH] sparc: time: Use pointer from memcpy() call for assignment in setup_sparc64_timer()

From: Markus Elfring

Date: Fri Oct 31 2025 - 04:46:51 EST


…>> +++ 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