• Mauro Carvalho Chehab's avatar
    media: v4l2-compat-ioctl32: better name userspace pointers · 6dd0394f
    Mauro Carvalho Chehab authored
    In the past, "up" were an acronym for "user pointer" and "kp" for
    "kernel pointer". However, since commit a1dfb4c4 ("media:
    v4l2-compat-ioctl32.c: refactor compat ioctl32 logic"), both
    are now __user pointers.
    
    So, the usage of "kp" is really misleading there. So, rename
    both to just "p32" and "p64" everywhere it occurs, in order to
    make peace with this file's namespace.
    
    There are two exceptions to "up/kp" nomenclature: at
    alloc_userspace() and at do_video_ioctl().
    
    There, a new userspace pointer were allocated, in order to store
    the 64 bits version of the ioctl. Those were called as "up_native",
    with is, IMHO, an even worse name, as "native" could mislead of
    being the arguments that were filled from userspace. I almost
    renamed it to just "p64", but, after thinking more about that,
    it sounded better to call it as "new_p64", as this makes clearer
    that this is the data structure that was allocated inside this
    file in order to be used to pass/retrieve data when calling the
    64-bit ready file->f_op->unlocked_ioctl() function.
    Suggested-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Suggested-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
    Reviewed-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    6dd0394f
v4l2-compat-ioctl32.c 35.1 KB