| From | Andy Shevchenko <> | Date | Thu, 28 Oct 2021 13:25:48 +0300 | Subject | Re: [v2 01/10] utils_macro: introduce find_closest_unsorted() |
| |
On Thu, Oct 28, 2021 at 1:18 PM Andrea Merello <andrea.merello@gmail.com> wrote: > > This is similar to find_closest() and find_closest_descending(), but, it > doesn't make any assumption about the array being ordered.
Macros in general are not so welcoming. Why do you do it as a macro?
...
> +#include <linux/math.h>
Wondering if the current header misses other inclusions it's a direct user of.
...
> +/** > + * find_closest_unsorted - locate the closest element in a unsorted array
an
> + * @x: The reference value. > + * @a: The array in which to look for the closest element. > + * @as: Size of 'a'. > + * > + * Similar to find_closest() but 'a' has no requirement to being sorted > + */
-- With Best Regards, Andy Shevchenko
|