On 25/02/2025 10:38 pm, Julien Grall wrote: > Hi Andrew, > > On 25/02/2025 22:20, Andrew Cooper wrote: >> There are currently two users, and lib.h is included everywhere. >> >> No functional change. >> >> Signed-off-by: Andrew Cooper <[email protected]> > > Acked-by: Julien Grall <[email protected]>
Thanks. Funnily enough, there's a hunk missing. diff --git a/xen/lib/bsearch.c b/xen/lib/bsearch.c index 149f7feafd1f..9973117d1d8e 100644 --- a/xen/lib/bsearch.c +++ b/xen/lib/bsearch.c @@ -10,4 +10,4 @@ */ #define BSEARCH_IMPLEMENTATION -#include <xen/lib.h> +#include <xen/bsearch.h> Nothing anywhere in CI notices, because not even ARM emits a library call, so the fact that bsearch.o is empty when it's discarded by the linker for not being used, is incidental. I cannot think of any good way to fix this pattern. Not even adding a self-test, because we intentionally write those in a way so they get dropped if the library function as a whole isn't referenced. Given that we've got this pattern exactly twice (this, and SORT), I think we just need to stay vigilant. ~Andrew
