lkml.org 
[lkml]   [2021]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [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

    \
     
     \ /
      Last update: 2021-11-21 14:26    [W:4.139 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site