On Wed, Aug 28, 2019 at 02:38:25PM +0100, Alexandru Elisei wrote: > The UL macro was previously defined in lib/arm64/asm/pgtable-hwdef.h. Move > it to lib/linux/const.h so it can be used in other files. To keep things > consistent, also add an ULL macro. > > Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx> > --- > lib/linux/const.h | 7 +++++-- > lib/arm64/asm/pgtable-hwdef.h | 2 -- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/lib/linux/const.h b/lib/linux/const.h > index c872bfd25e13..e3c7fec3f4b8 100644 > --- a/lib/linux/const.h > +++ b/lib/linux/const.h > @@ -21,7 +21,10 @@ > #define _AT(T,X) ((T)(X)) > #endif > > -#define _BITUL(x) (_AC(1,UL) << (x)) > -#define _BITULL(x) (_AC(1,ULL) << (x)) > +#define UL(x) _AC(x, UL) > +#define ULL(x) _AC(x, ULL) > + > +#define _BITUL(x) (UL(1) << (x)) > +#define _BITULL(x) (ULL(1) << (x)) I don't mind this, but if we want to keep this file consistent with Linux's include/uapi/linux/const.h, which is actually the goal, then we should be adding _UL and _ULL instead. But in that case we'd probably want to leave the define below. Thanks, drew > > #endif /* !(_LINUX_CONST_H) */ > diff --git a/lib/arm64/asm/pgtable-hwdef.h b/lib/arm64/asm/pgtable-hwdef.h > index 045a3ce12645..e6f02fae4075 100644 > --- a/lib/arm64/asm/pgtable-hwdef.h > +++ b/lib/arm64/asm/pgtable-hwdef.h > @@ -9,8 +9,6 @@ > * This work is licensed under the terms of the GNU GPL, version 2. > */ > > -#define UL(x) _AC(x, UL) > - > #define PTRS_PER_PTE (1 << (PAGE_SHIFT - 3)) > > /* > -- > 2.7.4 >