Applied, thanks! Milos Nikic, le dim. 01 mars 2026 20:49:19 -0800, a ecrit: > All of these utility macros are already provided by <kern/macros.h>, > which is included just a few lines above. > > Tested by recompiling and booting inside QEMU on x86_64 without issues. > > * kern/slab.c (P2ALIGNED, ISP2, P2ALIGN, P2ROUND, P2END, likely, unlikely): > Remove redundant macro definitions. > --- > kern/slab.c | 11 ----------- > 1 file changed, 11 deletions(-) > > diff --git a/kern/slab.c b/kern/slab.c > index b20dd26..90bc06d 100644 > --- a/kern/slab.c > +++ b/kern/slab.c > @@ -91,17 +91,6 @@ > #include <mach_debug/slab_info.h> > #endif > > -/* > - * Utility macros. > - */ > -#define P2ALIGNED(x, a) (((x) & ((a) - 1)) == 0) > -#define ISP2(x) P2ALIGNED(x, x) > -#define P2ALIGN(x, a) ((x) & -(a)) > -#define P2ROUND(x, a) (-(-(x) & -(a))) > -#define P2END(x, a) (-(~(x) & -(a))) > -#define likely(expr) __builtin_expect(!!(expr), 1) > -#define unlikely(expr) __builtin_expect(!!(expr), 0) > - > /* > * Minimum required alignment. > */ > -- > 2.53.0 > >
-- Samuel <T> csp.tar.gz: ascii text -+- #ens-mim - vive les browsers qui prennent des initiatives à la con -+-
