Messages in this thread | | | From | Arnd Bergmann <> | Date | Sun, 21 Nov 2021 14:25:48 +0100 | Subject | Re: [PATCH v2 15/20] linux/compiler.h: Implement __must_be_array() in terms of __must_be() |
| |
On Sat, Nov 20, 2021 at 2:00 PM Alejandro Colomar <alx.manpages@gmail.com> wrote:
> @@ -255,7 +255,7 @@ static inline void *offset_to_ptr(const int *off) > #endif /* __ASSEMBLY__ */ > > /* &a[0] degrades to a pointer: a different type from an array */ > -#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) > +#define __must_be_array(a) __must_be(!__same_type((a), &(a)[0]))
Please go the other way here and change all users of __must_be() to use BUILD_BUG_ON_ZERO() or BUILD_BUG_ON() for consistency.
Arnd
| |