From: Sam Ravnborg <sam@ravnborg.org>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Phillip Lougher <phillip@lougher.demon.co.uk>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] init: add sys-wrapper.h
Date: Tue, 31 Aug 2010 16:30:03 +0200 [thread overview]
Message-ID: <20100831143003.GA15001@merkur.ravnborg.org> (raw)
In-Reply-To: <AANLkTimysA_CmWVBOntV9bzUBy9Vbhi1MtUJQJAHbQxq@mail.gmail.com>
>
> /*
> * wrappers for various syscalls for use in the init code
> *
> * Copyright (C) 2010 Namhyung Kim <namhyung@gmail.com>
> *
> * This file is released under the GPLv2.
> */
>
> #include <linux/syscalls.h>
> #include <linux/dirent.h>
> #include <linux/types.h>
> #include <linux/fs.h>
>
> #include <asm/uaccess.h>
>
Good.
Except that we usually recommend to include files from include/linux
if thye exist rather than asm/xxx
So use: #include <linux/uaccess.h>
>
> >> +
> >> +#define kern_sys_call(call, ...) \
> >> +({ \
> >> + long result; \
> >> + mm_segment_t old_fs = get_fs(); \
> >> + set_fs(KERNEL_DS); \
> >> + result = call(__VA_ARGS__); \
> >> + set_fs(old_fs); \
> >> + result; \
> >> +})
> >> +
> >
> > Personal preference...
> > Replace kern_ with kernel_ all over.
> >
>
> Is this just your preference or general tendency?
I asked git:
$ git grep kern_ | wc -l
962
$ git grep kernel_ | wc -l
6361
There seems to be preference for kernel_
Sam
next prev parent reply other threads:[~2010-08-31 14:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 17:27 [PATCH v3 0/2] init cleanups Namhyung Kim
2010-08-30 17:27 ` [PATCH v3 1/2] init: add sys-wrapper.h Namhyung Kim
2010-08-30 19:03 ` Sam Ravnborg
2010-08-31 14:16 ` Namhyung Kim
2010-08-31 14:30 ` Sam Ravnborg [this message]
2010-08-31 14:34 ` Namhyung Kim
2010-08-30 17:27 ` [PATCH v3 2/2] init: use kern_sys_* wrappers instead of syscall Namhyung Kim
2010-08-30 19:10 ` Sam Ravnborg
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=20100831143003.GA15001@merkur.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=phillip@lougher.demon.co.uk \
--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 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®