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

Markus Elfring Markus.Elfring at web.de
Tue Nov 4 22:48:35 AEDT 2025


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


More information about the Linuxppc-dev mailing list