Re: uhid: broken interface: 32/64-bit compatibility

2013-02-18 Thread Dmitry Torokhov
On Mon, Feb 18, 2013 at 11:28:40AM +0100, Jiri Kosina wrote: > On Fri, 15 Feb 2013, Dmitry Torokhov wrote: > > > > Here's my attempt to fix the issue. > > > > > > Not sure if tricks with padding in a good idea. We can just use __u64 > > > instead of pointer, but it will require update of userspa

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-18 Thread Dmitry Torokhov
Hi David, On Fri, Feb 15, 2013 at 12:46:55PM +0100, David Herrmann wrote: > Hi Kirill > > On Fri, Feb 15, 2013 at 12:29 PM, Kirill A. Shutemov > wrote: > > Hi David and all, > > > > There's claim in uhid.h that the interface is "compatible even between > > architectures". But it obviously is not

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-18 Thread Jiri Kosina
On Fri, 15 Feb 2013, Dmitry Torokhov wrote: > > Here's my attempt to fix the issue. > > > > Not sure if tricks with padding in a good idea. We can just use __u64 > > instead of pointer, but it will require update of userspace to silence > > cast warning and will cause warning if you will try to

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-18 Thread Kirill A. Shutemov
Dmitry Torokhov wrote: > On Fri, Feb 15, 2013 at 03:51:41PM +0200, Kirill A. Shutemov wrote: > > Johan Hedberg wrote: > > > Hi David, > > > > > > On Fri, Feb 15, 2013, David Herrmann wrote: > > > > On Fri, Feb 15, 2013 at 12:29 PM, Kirill A. Shutemov > > > > wrote: > > > > > Hi David and all, > >

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-15 Thread Dmitry Torokhov
On Fri, Feb 15, 2013 at 03:51:41PM +0200, Kirill A. Shutemov wrote: > Johan Hedberg wrote: > > Hi David, > > > > On Fri, Feb 15, 2013, David Herrmann wrote: > > > On Fri, Feb 15, 2013 at 12:29 PM, Kirill A. Shutemov > > > wrote: > > > > Hi David and all, > > > > > > > > There's claim in uhid.h th

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-15 Thread Andy Shevchenko
> Any comments? Generic comments. Could you use *_compat instead of *_old_*? Another idea is do not touch current interface, just append new function and associated structure to make a smooth transition of the userspace stuff. What about documentation (Documentation/hid/uhid.txt)? Could you upd

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-15 Thread Kirill A. Shutemov
Johan Hedberg wrote: > Hi David, > > On Fri, Feb 15, 2013, David Herrmann wrote: > > On Fri, Feb 15, 2013 at 12:29 PM, Kirill A. Shutemov > > wrote: > > > Hi David and all, > > > > > > There's claim in uhid.h that the interface is "compatible even between > > > architectures". But it obviously is

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-15 Thread Johan Hedberg
Hi David, On Fri, Feb 15, 2013, David Herrmann wrote: > On Fri, Feb 15, 2013 at 12:29 PM, Kirill A. Shutemov > wrote: > > Hi David and all, > > > > There's claim in uhid.h that the interface is "compatible even between > > architectures". But it obviously is not true: struct uhid_create_req > > c

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-15 Thread David Herrmann
Hi Kirill On Fri, Feb 15, 2013 at 12:29 PM, Kirill A. Shutemov wrote: > Hi David and all, > > There's claim in uhid.h that the interface is "compatible even between > architectures". But it obviously is not true: struct uhid_create_req > contains pointer which breaks everything. > > The easy way