[lkml]   [2022]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v2] include/uapi/linux/swab.h: move explicit cast outside ternary
    On Tue, Jun 7, 2022 at 5:14 PM Justin Stitt <> wrote:
    > A cast inside __builtin_constant_p doesn't do anything since it should evaluate
    > as constant at compile time irrespective of this cast. Instead, I moved this
    > cast outside the ternary to ensure the return type is as expected.
    > For instance, if __HAVE_BUILTIN_BSWAP16__ was not defined then __swab16 is
    > actually returning an `int` not a `u16` due to integer promotion as described
    > by Nick in this thread. This has repercussions when building with clang

    Also, "this thread" won't make much sense when applied if someone is
    looking at git log. Consider phrasing this instead as "in the lore
    link below" then include another link tag to


    Though, I think it's simply more concise to just include what Al said,
    and drop this sentence altogether. You can send me v3 privately as an
    RFC and I'll greenlight it before you resend to the list.
    ~Nick Desaulniers

     \ /
      Last update: 2022-06-08 23:21    [W:6.170 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site