[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090107150025.GC23455@elte.hu>
Date: Wed, 7 Jan 2009 16:00:25 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Casey Dahlin <cdahlin@...hat.com>
Cc: Linux Kernel <linux-kernel@...r.kernel.org>,
Randy Dunlap <randy.dunlap@...cle.com>,
Roland McGrath <roland@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
Davide Libenzi <davidel@...ilserver.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [RESEND][RFC PATCH v2] waitfd
* Casey Dahlin <cdahlin@...hat.com> wrote:
> >> +asmlinkage long sys_waitfd(int which, pid_t upid, int options, int unused)
> >> +{
> >> + int ufd;
> >> + struct waitfd_ctx *ctx;
> >> +
> >> + /* Just to make sure we don't end up with a sys_waitfd4 */
> >> + (void)unused;
> >
> > looks a bit silly ...
>
>
> Do you mean the principle of having an unused argument around for future
> use or the cast to void? The cast to void is there to suppress the
> "Waning: unused argument" messages and make gcc happy.
gcc will not warn about unused function arguments - only about unused
local variables. The 'unused' argument should either be removed
altogether, or replaced with a properly named parameter and a check
returning -ENOSYS if the argument is not zero (or something like that).
(It's generally better to keep such syscalls extensible via such trivial
means, if there's a remote chance for ever needing to extend that
syscall.)
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists