From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Calixto Subject: Re: [PATCH v6] mmc: Add mmc CMD+ACMD passthrough ioctl Date: Wed, 20 Apr 2011 12:34:20 -0700 (PDT) Message-ID: References: <201104202117.14463.arnd@arndb.de> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from elasmtp-dupuy.atl.sa.earthlink.net ([209.86.89.62]:35996 "EHLO elasmtp-dupuy.atl.sa.earthlink.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755656Ab1DTTe3 (ORCPT ); Wed, 20 Apr 2011 15:34:29 -0400 In-Reply-To: <201104202117.14463.arnd@arndb.de> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Arnd Bergmann Cc: =?ISO-8859-2?Q?Micha=B3_Miros=B3aw?= , linux-mmc@vger.kernel.org, Andrei Warkentin , Chris Ball Hi Arnd, 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? John