From: Jon Hunter <jonathanh@nvidia.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Seshagiri Holi <sholi@nvidia.com>, Arnd Bergmann <arnd@arndb.de>,
Grant Grundler <grundler@google.com>,
Olof Johansson <olofj@chromium.org>
Subject: Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands
Date: Fri, 18 Sep 2015 11:24:05 +0100 [thread overview]
Message-ID: <55FBE645.8030001@nvidia.com> (raw)
In-Reply-To: <CAPDyKFpPkDYj6-3x0pdKOCZrhr+f4CduX+p9DO=GHuUO9kZBag@mail.gmail.com>
On 17/09/15 07:59, Ulf Hansson wrote:
> [...]
>
>>>> + /*
>>>> + * The caller must have CAP_SYS_RAWIO, and must be calling this on the
>>>> + * whole block device, not on a partition. This prevents overspray
>>>> + * between sibling partitions.
>>>> + */
>>>> + if ((!capable(CAP_SYS_RAWIO)) || (bdev != bdev->bd_contains))
>>>> + return -EPERM;
>>>
>>> This check is common for multi and non-multi. Please move it to the
>>> mmc_blk_ioctl() to avoid some code duplication.
>>
>> Yes that's true. I can move but it means also passing bdev to
>> __mmc_blk_ioctl_cmd() as another argument. It is not a big deal, but it
>> was more convenient to test here. If your preference is to consolidate
>> the tests to one place then I will move this test.
>
> I was suggesting to move it to mmc_blk_ioctl() and not to
> __mmc_blk_ioctl_cmd(). That shouldn't cause any changes to any
> function-definitions, right!?
Sorry, completely mis-read. Yes that makes sense, will update.
Cheers
Jon
next prev parent reply other threads:[~2015-09-18 10:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 15:00 [PATCH V3] mmc: block: Add new ioctl to send multi commands Jon Hunter
2015-09-14 16:36 ` Grant Grundler
2015-09-16 11:08 ` Ulf Hansson
2015-09-16 16:01 ` Jon Hunter
2015-09-17 6:59 ` Ulf Hansson
2015-09-18 10:24 ` Jon Hunter [this message]
2015-09-16 17:54 ` Gwendal Grignou
2015-09-21 9:56 ` Jon Hunter
2015-09-21 11:19 ` Jon Hunter
2015-09-21 18:40 ` Grant Grundler
2015-09-22 9:29 ` Jon Hunter
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=55FBE645.8030001@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=arnd@arndb.de \
--cc=grundler@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--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).