]> git.baikalelectronics.ru Git - kernel.git/commit
media: v4l2-compat-ioctl32: better name userspace pointers
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 16 Apr 2018 14:58:18 +0000 (10:58 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 20 Apr 2018 12:19:31 +0000 (08:19 -0400)
commit87d28279732a6da44cdb35826dc680ebffea79ea
tree0ebb1c6a4d225c573b7a32e042ad7139813c5c07
parent804945a1e741316ed1c25d638a5998f6017b0c05
media: v4l2-compat-ioctl32: better name userspace pointers

In the past, "up" were an acronym for "user pointer" and "kp" for
"kernel pointer". However, since commit 64f90597bdf6 ("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: Sakari Ailus <sakari.ailus@linux.intel.com>
Suggested-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c