On Wednesday 20 April 2011 21:34:20 John Calixto wrote:
> On Wed, 20 Apr 2011, Arnd Bergmann wrote:
> >
> > No need for a union or a ptr_size member in the struct. Just use
> > a single __u64 and let the user cast the pointer to that. This
> > will work on all architectures.
> >
> > > However, I still think it should be implemented in compat_ioctl()
> > > because compat_blkdev_ioctl() expects it. Either that, or I add to the
> > > big switch in compat_blkdev_driver_ioctl(), and spreading this change
> > > out to block/compat_ioctl.c does not seem like The Right Thing to me.
> >
>
> In the non-compat use case with a 32-bit kernel + 32-bit userspace (e.g.
> ARM), the casting of the __u64 to a pointer causes a compiler warning.
> It works as intended, so it's not an error, but it does not feel right
> to just silence the compiler. That's why I used a memcpy with with
> explicit pointer size directly in the struct. How else would you
> recommend I handle this?
Just cast to unsigned long and then to pointer.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html