From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: bintian.wang@linaro.org
Cc: linux-kernel@vger.kernel.org,
Mike Lockwood <lockwood@android.com>,
dmitry pervushin <dpervushin@gmail.com>,
Colin Cross <ccross@android.com>,
Android Kernel Team <kernel-team@android.com>,
Andrew Morton <akpm@linux-foundation.org>,
John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH RFC] Add FAT_IOCTL_GET_VOLUME_ID
Date: Mon, 01 Jul 2013 15:19:31 +0900 [thread overview]
Message-ID: <87sizykdjg.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <87wqpakdvd.fsf@devron.myhome.or.jp> (OGAWA Hirofumi's message of "Mon, 01 Jul 2013 15:12:22 +0900")
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> writes:
>> + case FAT_IOCTL_GET_VOLUME_ID:
>> + id = fat_ioctl_volume_id(inode);
>> + return copy_to_user((unsigned int *)arg, &id, sizeof(id));
>
>> + case FAT_IOCTL_GET_VOLUME_ID:
>> + id = fat_ioctl_volume_id(inode);
>> + return copy_to_user((unsigned int *)arg, &id, sizeof(id));
>
> This pattern seems to from put_user().
>
> Unnecessary cast of 1st arg. And copy_to_user() returns remaining bytes
> when fail (not error code).
Ah, actually, this needs cast, but it is to annotate for sparse. Well,
is there any reason to restrict this only on the directory?
For now, fat_generic_ioctl() looks easier way to do this.
(fat_generic_ioctl() should work for the both of compat code and dir/file)
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2013-07-01 6:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 2:39 bintian.wang
2013-07-01 6:12 ` OGAWA Hirofumi
2013-07-01 6:19 ` OGAWA Hirofumi [this message]
[not found] ` <CAJ2TvK=SVMfuFw+U46z-iCS1sYZgnmdk+sr30NeNFTayot7g8g@mail.gmail.com>
[not found] ` <CAO+d-qrq9XD2d0FtoA7ZkCsSkka0sfgERb-OeNoU2kLXpF+PVA@mail.gmail.com>
2013-07-01 9:29 ` OGAWA Hirofumi
[not found] ` <CAO+d-qqs0uUqNcmOhgZdKeaJQxd5y+TyKVFSpgknoUkX2YidfQ@mail.gmail.com>
2013-07-01 11:43 ` OGAWA Hirofumi
2013-07-01 11:40 bintian.wang
2013-07-01 12:00 ` OGAWA Hirofumi
2013-07-03 2:19 bintian.wang
2013-07-03 3:22 ` OGAWA Hirofumi
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=87sizykdjg.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@linux-foundation.org \
--cc=bintian.wang@linaro.org \
--cc=ccross@android.com \
--cc=dpervushin@gmail.com \
--cc=john.stultz@linaro.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lockwood@android.com \
/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
all inboxes | Powered by JetHome®