+31
−30
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Using list_add + list_sort to insert an element and keeping the list sorted is a somewhat blunt instrument; one can find the right place to insert in fewer lines of code than the cmp callback uses. Moreover, walking the entire list afterwards to merge adjacent ranges is overkill, since we know that only the just-inserted element may be merged with its neighbours. Signed-off-by:Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by:
Marc Zyngier <marc.zyngier@arm.com>