Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > Yeah, I saw that. I took it as we should consider changing this more > generally (e.g. with coccicheck etc.). To make things easier in the future, for the record, I in general do not suggest such a bulk rewrite for the sake of rewrite, whether driven with Coccinelle or something else, and I did not in this case. > This was mentioned in one of the original threads about the memcpy() > idiom, but IIRC there was some reason to think that it wasn't as widely > supported, ... I somehow thought that we had that stage too long ago; I recall we spotted struct assignment in a patch post release and left it there without reverting. > ... or in any case we'd want to re-rest that the compilers we > care about similarly optimize it. Perhaps. Using struct assignment only when we feel an urge to use memcpy() in a new code (or in the postimage of a newly rewritten code), instead of doing a bulk update, would give us a chance to start small and vet the result with compilers of such a small scale rewrite carefully to build confidence, hopefully? Thanks.