From: Alexey Dobriyan <adobri...@gmail.com> Date: Sat, 19 Nov 2016 04:08:08 +0300
> 1) cast to "int" is unnecessary: > u8 will be promoted to int before decrementing, > small positive numbers fit into "int", so their values won't be changed > during promotion. > > Once everything is int including loop counters, signedness doesn't > matter: 32-bit operations will stay 32-bit operations. > > But! Someone tried to make this loop smart by making everything of > the same type apparently in an attempt to optimise it. > Do the optimization, just differently. > Do the cast where it matters. :^) > > 2) frag size is unsigned entity and sum of fragments sizes is also > unsigned. > > Make everything unsigned, leave no MOVSX instruction behind. ... > Signed-off-by: Alexey Dobriyan <adobri...@gmail.com> Applied to net-next.