Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31544 )
Change subject: lib: Add Bubble sort algorithm ......................................................................
Patch Set 1:
Patch Set 1:
Please add it under commonlib and use qsort.
I agree with the commonlib-part, will move it to this location. Regarding the algorithm itself I would like tostick with bubblesort for the following reasons: -it is simple -it might turn out that there is a need for a stable sorting algo. Qsort is not stable while bubble sort is -The amount of data to sort in this given case (acpi MADT) is short (up to MAX_CPUS). There is no benefit in qsort vs. bubblesort on this data set -bubblesort does not need to stay the only algo in sort.c. It is more meant as a general location for different sorting algos, which can be added on demand there.