crypto: sun8i-ce-hash - Refine exception handling in sun8i_ce_hash_run()
Julian Calaby
julian.calaby at gmail.com
Sun Apr 13 00:45:56 PDT 2025
Hi Markus,
On Wed, Apr 9, 2025 at 10:47 PM Markus Elfring <Markus.Elfring at web.de> wrote:
>
> >> Two if branches contained duplicate source code.
> >> Thus avoid the specification of repeated error code assignments by using
> >> additional labels instead.
> …
> > Now there is one rather opaque label it goes to, so a reader doesn't see
> > the error code immediately. And it really just saves one line per case
> > here. …
> I imagine that such a code refinement can occasionally matter.
Just because you imagine that such a code refinement might matter,
doesn't mean it's actually useful.
1. this is making the code significantly less readable to save 1 line.
2. gotos into control blocks are weird at best and problematic and
confusing at worst. There's a reason why nobody writes code like this.
3. this sort of tail merging is something a compiler would apply
automatically when optimising for size and it can do a much better job
of this than you can.
I note that you said you did this using the Coccinelle software. Is
the semantic patch something you're trying to get upstream at part of
coccicheck? If so, could you please get that semantic patch merged
before posting these patches?
Thanks,
--
Julian Calaby
Email: julian.calaby at gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
More information about the linux-arm-kernel
mailing list