From: Arnd Bergmann <arnd@arndb.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Amerigo Wang <amwang@redhat.com>,
linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [Patch] compat ioctl: fix some build warnings
Date: Sat, 6 Feb 2010 09:58:16 +0100 [thread overview]
Message-ID: <201002060958.16360.arnd@arndb.de> (raw)
In-Reply-To: <20100205140150.7f5df97b.akpm@linux-foundation.org>
On Friday 05 February 2010, Andrew Morton wrote:
> Unfortunately that adds more code for something which cannot happen at
> runtime.
>
> I guess we could do this trick:
>
> --- a/fs/compat_ioctl.c~a
> +++ a/fs/compat_ioctl.c
> @@ -539,7 +539,7 @@ static int mt_ioctl_trans(unsigned int f
> kcmd = MTIOCPOS;
> karg = &pos;
> break;
> - case MTIOCGET32:
> + default: /* MTIOCGET32 */
> kcmd = MTIOCGET;
> karg = &get;
> break;
> @@ -657,7 +657,7 @@ static int raw_ioctl(unsigned fd, unsign
>
> switch (cmd) {
> case RAW_SETBIND:
> - case RAW_GETBIND: {
> + default: { /* RAW_GETBIND */
> struct raw_config_request req;
> mm_segment_t oldfs = get_fs();
>
Looks good to me. Actually, we could just kill the switch/case
statement in raw_ioctl entirely, but I wouldn't bother at this
point any more because there are already patches from both Al
and me to kill that function by moving it into drivers/char/raw.c
I need to check what happened to that patch and to the other
patches I have removing code form fs/compat_ioctl.c, they might
need to be updated before I can submit them for the next merge.
In the meantime,
Acked-by: Arnd Bergmann <arnd@arndb.de>
next prev parent reply other threads:[~2010-02-06 8:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 7:05 [Patch] compat ioctl: fix some build warnings Amerigo Wang
2010-02-05 22:01 ` Andrew Morton
2010-02-06 8:58 ` Arnd Bergmann [this message]
2010-02-08 2:56 ` Cong Wang
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=201002060958.16360.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=amwang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.