xen/bsearch: Split out of lib.h into it's own header
PATCH 1/1 xen/bsearch: Split out of lib.h into it's own header
There are currently two users, and lib.h is included everywhere.
No functional change.
---
CC: Anthony PERARD <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Julien Grall <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Bertrand Marquis <[email protected]>
This will marginally improve compile times, but mostly it's about splitting up lib.h
--- xen/arch/arm/io.c | 1 + xen/arch/arm/vgic/vgic-mmio.c | 1 + xen/include/xen/bsearch.h | 50 +++++++++++++++++++++++++++++++++++ xen/include/xen/lib.h | 43 ------------------------------ 4 files changed, 52 insertions(+), 43 deletions(-) create mode 100644 xen/include/xen/bsearch.h
xen/arch/arm/io.c +1 -0
@@ -7,6 +7,7 @@* Copyright (c) 2011 Citrix Systems. */ +#include <xen/bsearch.h> #include <xen/ioreq.h> #include <xen/lib.h> #include <xen/spinlock.h>
xen/arch/arm/vgic/vgic-mmio.c +1 -0
@@ -13,6 +13,7 @@*/ #include <xen/bitops.h> +#include <xen/bsearch.h> #include <xen/lib.h> #include <xen/sched.h> #include <asm/new_vgic.h>
xen/include/xen/bsearch.h new file +50 -0
50 lines not on this page · raw message
xen/include/xen/lib.h +0 -43
49 lines not on this page · raw message
Signature · 1 line
2.39.5
Hi Andrew,
Quoted 5 lines · Andrew Cooper
There are currently two users, and
lib.his included everywhere.No functional change.
Signed-off-by Andrew Cooper <[email protected]>
Cheers,
Signature · 1 line
Julien Grall
Quoted 10 lines · Julien Grall
Hi Andrew,
Quoted 5 lines · Andrew Cooper
There are currently two users, and
lib.his 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.
xen/lib/bsearch.c +0 -0
@@ -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