[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100831143003.GA15001@merkur.ravnborg.org>
Date: Tue, 31 Aug 2010 16:30:03 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Namhyung Kim <namhyung@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Phillip Lougher <phillip@...gher.demon.co.uk>,
Al Viro <viro@...iv.linux.org.uk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] init: add sys-wrapper.h
>
> /*
> * wrappers for various syscalls for use in the init code
> *
> * Copyright (C) 2010 Namhyung Kim <namhyung@...il.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
--
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