• Arnd Bergmann's avatar
    IB/uverbs: clean up INIT_UDATA() macro usage · 40a20339
    Arnd Bergmann authored
    After changing INIT_UDATA_BUF_OR_NULL() to an inline function,
    this does the same change to INIT_UDATA for consistency.
    I'm keeping it separate as this part is much larger and
    we wouldn't want to backport this to stable kernels if we
    ever want to address the gcc warnings by backporting the
    first patch.
    
    Again, using an inline function gives us better type
    safety here among other issues with macros. I'm using
    u64_to_user_ptr() to convert the user pointer to simplify
    the logic rather than adding lots of new type casts.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    40a20339
uverbs_cmd.c 95.7 KB