Re: [PATCH] mmc: block: Add new ioctl to send multi commands

2015-09-10 Thread Jon Hunter
Hi Arnd, On 09/09/15 21:22, Arnd Bergmann wrote: > On Wednesday 09 September 2015 17:44:54 Jon Hunter wrote: >> >> On 09/09/15 16:56, Arnd Bergmann wrote: >>> On Wednesday 09 September 2015 16:06:01 Jon Hunter wrote: + + idata = kcalloc(mcci.num_of_cmds, sizeof(*idata),

Re: [PATCH] mmc: block: Add new ioctl to send multi commands

2015-09-10 Thread Arnd Bergmann
On Thursday 10 September 2015 09:24:19 Jon Hunter wrote: > On 09/09/15 21:22, Arnd Bergmann wrote: > > On Wednesday 09 September 2015 17:44:54 Jon Hunter wrote: > >> On 09/09/15 16:56, Arnd Bergmann wrote: > >>> On Wednesday 09 September 2015 16:06:01 Jon Hunter wrote: > > > - you have some

Re: [PATCH] mmc: block: Add new ioctl to send multi commands

2015-09-10 Thread Grant Grundler
On Thu, Sep 10, 2015 at 1:24 AM, Jon Hunter wrote: ... >> - you have some implicit padding after the structure and should replace that >> with explictit pad bytes to extend the structure to a multiple of its >> alignment (8 bytes). > > Would padding with __u32 at the end

Re: [PATCH] mmc: block: Add new ioctl to send multi commands

2015-09-10 Thread Jon Hunter
On 10/09/15 18:10, Grant Grundler wrote: > On Thu, Sep 10, 2015 at 1:24 AM, Jon Hunter wrote: > ... >>> - you have some implicit padding after the structure and should replace that >>> with explictit pad bytes to extend the structure to a multiple of its >>> alignment

Re: [PATCH] mmc: block: Add new ioctl to send multi commands

2015-09-10 Thread Grant Grundler
On Thu, Sep 10, 2015 at 11:20 AM, Jon Hunter wrote: > > On 10/09/15 18:10, Grant Grundler wrote: ... >> struct mmc_ioc_multi_cmd { >> __u64 num_of_cmds; >> struct mmc_ioc_cmd cmds[0]; >> }; >> >> I think this would work just as well. But doesn't

Re: [PATCH] mmc: block: Add new ioctl to send multi commands

2015-09-09 Thread Arnd Bergmann
On Wednesday 09 September 2015 16:06:01 Jon Hunter wrote: > + > + idata = kcalloc(mcci.num_of_cmds, sizeof(*idata), GFP_KERNEL); > + if (!idata) { > + err = -ENOMEM; > + goto cmd_err; > + } > + > + cmds = (struct mmc_ioc_cmd __user *)(unsigned

Re: [PATCH] mmc: block: Add new ioctl to send multi commands

2015-09-09 Thread Jon Hunter
On 09/09/15 16:56, Arnd Bergmann wrote: > On Wednesday 09 September 2015 16:06:01 Jon Hunter wrote: >> + >> + idata = kcalloc(mcci.num_of_cmds, sizeof(*idata), GFP_KERNEL); >> + if (!idata) { >> + err = -ENOMEM; >> + goto cmd_err; >> + } >> + >> +

Re: [PATCH] mmc: block: Add new ioctl to send multi commands

2015-09-09 Thread Arnd Bergmann
On Wednesday 09 September 2015 17:44:54 Jon Hunter wrote: > > On 09/09/15 16:56, Arnd Bergmann wrote: > > On Wednesday 09 September 2015 16:06:01 Jon Hunter wrote: > >> + > >> + idata = kcalloc(mcci.num_of_cmds, sizeof(*idata), GFP_KERNEL); > >> + if (!idata) { > >> +