From: Jon Hunter <jonathanh@nvidia.com>
To: Grant Grundler <grundler@google.com>, Olof Johansson <olof@lixom.net>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Olof Johansson <olofj@chromium.org>,
Seshagiri Holi <sholi@nvidia.com>
Subject: Re: [RFC PATCH] mmc: block: Add new ioctl to send combo commands
Date: Thu, 3 Sep 2015 16:10:18 +0100 [thread overview]
Message-ID: <55E862DA.1080509@nvidia.com> (raw)
In-Reply-To: <CANEJEGvRSDFjrVPMN=3d2yEK=d1eQYQgvAynw75Qj2fcPdrq7Q@mail.gmail.com>
On 02/09/15 23:08, Grant Grundler wrote:
> [resending text-only]
>
> On Wed, Sep 2, 2015 at 3:07 PM, Grant Grundler <grundler@google.com> wrote:
>>
>>
>> On Wed, Sep 2, 2015 at 11:28 AM, Olof Johansson <olof@lixom.net> wrote:
>> ...
>>>> +/**
>>>> + * struct mmc_ioc_combo_cmd - combo command information
>>>> + * @num_of_cmds: number of commands to send
>>>> + * @mmc_ioc_cmd_list: pointer to list of commands
>>>> + */
>>>> +struct mmc_ioc_combo_cmd {
>>>> + uint8_t num_of_cmds;
>>>> + struct mmc_ioc_cmd *mmc_ioc_cmd_list;
>>>> +};
>>>
>>> The size of this struct will depend on the pointer size of userspace.
>>>
>>> It might be better to use a u64 for the pointer instead. Otherwise
>>> you'd need a compat ioctl wrapper to copy a 32-bit pointer over on a
>>> 64-bit kernel.
>>
>> If alignment matters, then maybe swap the fields?
>> Or declare num_of_cmds as u64 as well?
Thanks. I did swap them in the updated version as this seems to make
sense. However, I left num_of_cmds as an 8-bit value unless someone has
a need for more than 256 commands ;-)
Jon
next prev parent reply other threads:[~2015-09-03 15:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 14:21 [RFC PATCH] mmc: block: Add new ioctl to send combo commands Jon Hunter
2015-09-02 18:28 ` Olof Johansson
[not found] ` <CANEJEGsb=bSyqYW6K5eXr8PwUrJxokOHz894ofk4F-SRohGeQQ@mail.gmail.com>
2015-09-02 22:08 ` Grant Grundler
2015-09-03 15:10 ` Jon Hunter [this message]
2015-09-04 1:16 ` Grant Grundler
[not found] ` <CANEJEGsGfr9j8AZz-mpC=a87QX9+OJwtESCASR_t5_SYqbV8fg@mail.gmail.com>
2015-09-08 9:18 ` Jon Hunter
2015-09-03 15:08 ` Jon Hunter
2015-09-09 12:42 ` Ulf Hansson
2015-09-09 13:59 ` Jon Hunter
2015-09-10 8:43 ` Jon Hunter
2015-09-10 10:13 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55E862DA.1080509@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=grundler@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=olofj@chromium.org \
--cc=sholi@nvidia.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).