[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVPYUY-vpeoKJKX2XN7-0w+=seW0u3EaP=hD9m1Sy7nkTQ@mail.gmail.com>
Date: Tue, 6 Dec 2011 21:11:08 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: linux-arm-kernel@...ts.infradead.org,
Mauro Carvalho Chehab <mchehab@...radead.org>,
Tony Lindgren <tony@...mide.com>, Greg KH <greg@...ah.com>,
linux-kernel@...r.kernel.org,
Sylwester Nawrocki <snjw23@...il.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>, linux-omap@...r.kernel.org
Subject: Re: [RFC PATCH v1 5/7] media: v4l2: introduce two IOCTLs for face detection
On Tue, Dec 6, 2011 at 8:55 PM, Arnd Bergmann <arnd@...db.de> wrote:
> On Tuesday 06 December 2011, Ming Lei wrote:
>> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
>> index 073eb4d..8aeaa1e 100644
>> --- a/include/linux/videodev2.h
>> +++ b/include/linux/videodev2.h
>> @@ -2214,7 +2214,12 @@ struct v4l2_fd_result {
>> __u32 buf_index;
>> __u32 face_cnt;
>> __u32 reserved[6];
>> - struct v4l2_fd_detection *fd;
>> +
>> + /*make 64/32 compatible*/
>> + union {
>> + struct v4l2_fd_detection *fd;
>> + __u64 dummy;
>> + };
>> };
>>
>
> That's not compatible, at least not on any big-endian architecture.
> If you want to have an indirect pointer, you have to cast it to the
> __u64 member in user space and back in kernel space.
Looks like it is a bit ugly.
>
> Using an array added to the end of the v4l2_fd_result structure
> rather than a pointer would really make this easier IMHO.
I have tried to do this, but video_usercopy needs a few changes
to handle array args if no indirect pointer is passed to kernel.
I am not sure if media guys are happy to accept the changes, :-)
thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists