]> git.baikalelectronics.ru Git - uboot.git/commit
include: kernel.h: port find_closest() from Linux
authorChris Packham <judge.packham@gmail.com>
Sun, 19 Mar 2023 21:23:43 +0000 (10:23 +1300)
committerTom Rini <trini@konsulko.com>
Thu, 30 Mar 2023 19:09:59 +0000 (15:09 -0400)
commita5491e927ff5b222628c5fd5f755dfb47318657a
tree80a9d7bee027eac1f34c6d17c7ad2400d7cc87b0
parent8fa25e01d873a4f9fb6664f721951799f9361841
include: kernel.h: port find_closest() from Linux

The find_closest() macro can be used to find an element in a sorted
array that is closest to an input value. Bring in this macro from
Linux v6.3-rc1-2-g8ca09d5fa354.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/linux/kernel.h