Messages in this thread | | | Date | Tue, 31 Aug 2010 16:30:03 +0200 | From | Sam Ravnborg <> | 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@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |