lkml.org 
[lkml]   [2010]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2010-08-31 16:33    [W:0.175 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site