Thread (3 messages) 3 messages, 2 authors, 2025-11-04

Re: [PATCH] powerpc/cputable: Use pointer from memcpy() call for assignment in set_cur_cpu_spec()

From: Markus Elfring <hidden>
Date: 2025-11-04 11:49:38
Also in: kernel-janitors, lkml

quoted
A pointer was assigned to a variable. The same pointer was used for
the destination parameter of a memcpy() call.
This function is documented in the way that the same value is returned.
Thus convert two separate statements into a direct variable assignment for
the return value from a memory copy action.
I can't see the added value of this change. For me it degrades readability.
I dared to present another coding style view.

Many places in cputable.c have that t = PTRRELOC(t) pattern,
Several assignment statements can occur.

I can't see why that one should be changed while other ones remain.
Copy calls influenced the suggested source code transformation.

Can you elaborate why this change is desirable ?
I imagine that selected variable assignments might be avoidable.

Regards,
Markus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help