Re: [PATCH v2 3/4] media: v4l2-compat-ioctl32: simplify casts

2018-04-20 Thread Hans Verkuil
On 04/19/18 18:33, Mauro Carvalho Chehab wrote: > Making the cast right for get_user/put_user is not trivial, as > it needs to ensure that the types are the correct ones. > > Improve it by using macros. > > Tested with vivid with: > $ sudo modprobe vivid no_error_inj=1 > $ v4l2-compli

[PATCH v2 3/4] media: v4l2-compat-ioctl32: simplify casts

2018-04-19 Thread Mauro Carvalho Chehab
Making the cast right for get_user/put_user is not trivial, as it needs to ensure that the types are the correct ones. Improve it by using macros. Tested with vivid with: $ sudo modprobe vivid no_error_inj=1 $ v4l2-compliance-32bits -a -s10 >32bits && v4l2-compliance-64bits -a -s