lkml.org 
[lkml]   [2011]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6/7] Kernel: fix spaces with respect to the coding style in sys.c.
    Date
    Fixed trailing spaces, spaces around the ternary operators and in the
    pre-processor function declarations with the help of the checkpatch.pl
    tool.

    Signed-off-by: Akshay Joshi <me@akshayjoshi.com>
    Acked-by: David Howells <dhowells@redhat.com>
    ---
    kernel/sys.c | 40 ++++++++++++++++++++--------------------
    1 files changed, 20 insertions(+), 20 deletions(-)

    diff --git a/kernel/sys.c b/kernel/sys.c
    index e4128b2..94f02f5 100644
    --- a/kernel/sys.c
    +++ b/kernel/sys.c
    @@ -51,28 +51,28 @@
    #include <asm/unistd.h>

    #ifndef SET_UNALIGN_CTL
    -# define SET_UNALIGN_CTL(a,b) (-EINVAL)
    +# define SET_UNALIGN_CTL(a, b) (-EINVAL)
    #endif
    #ifndef GET_UNALIGN_CTL
    -# define GET_UNALIGN_CTL(a,b) (-EINVAL)
    +# define GET_UNALIGN_CTL(a, b) (-EINVAL)
    #endif
    #ifndef SET_FPEMU_CTL
    -# define SET_FPEMU_CTL(a,b) (-EINVAL)
    +# define SET_FPEMU_CTL(a, b) (-EINVAL)
    #endif
    #ifndef GET_FPEMU_CTL
    -# define GET_FPEMU_CTL(a,b) (-EINVAL)
    +# define GET_FPEMU_CTL(a, b) (-EINVAL)
    #endif
    #ifndef SET_FPEXC_CTL
    -# define SET_FPEXC_CTL(a,b) (-EINVAL)
    +# define SET_FPEXC_CTL(a, b) (-EINVAL)
    #endif
    #ifndef GET_FPEXC_CTL
    -# define GET_FPEXC_CTL(a,b) (-EINVAL)
    +# define GET_FPEXC_CTL(a, b) (-EINVAL)
    #endif
    #ifndef GET_ENDIAN
    -# define GET_ENDIAN(a,b) (-EINVAL)
    +# define GET_ENDIAN(a, b) (-EINVAL)
    #endif
    #ifndef SET_ENDIAN
    -# define SET_ENDIAN(a,b) (-EINVAL)
    +# define SET_ENDIAN(a, b) (-EINVAL)
    #endif
    #ifndef GET_TSC_CTL
    # define GET_TSC_CTL(a) (-EINVAL)
    @@ -342,7 +342,7 @@ EXPORT_SYMBOL_GPL(kernel_restart);
    static void kernel_shutdown_prepare(enum system_states state)
    {
    blocking_notifier_call_chain(&reboot_notifier_list,
    - (state == SYSTEM_HALT)?SYS_HALT:SYS_POWER_OFF, NULL);
    + (state == SYSTEM_HALT) ? SYS_HALT : SYS_POWER_OFF, NULL);
    system_state = state;
    usermodehelper_disable();
    device_shutdown();
    @@ -488,7 +488,7 @@ void ctrl_alt_del(void)
    else
    kill_cad_pid(SIGINT, 1);
    }
    -
    +
    /*
    * Unprivileged users may change the real gid to the effective gid
    * or vice versa. (BSD-style)
    @@ -502,7 +502,7 @@ void ctrl_alt_del(void)
    *
    * The general idea is that a program which uses just setregid() will be
    * 100% compatible with BSD. A program which uses just setgid() will be
    - * 100% compatible with POSIX with saved IDs.
    + * 100% compatible with POSIX with saved IDs.
    *
    * SMP: There are not races, the GIDs are checked only by filesystem
    * operations (as far as semantic preservation is concerned).
    @@ -550,7 +550,7 @@ error:
    }

    /*
    - * setgid() is implemented like SysV w/ SAVED_IDS
    + * setgid() is implemented like SysV w/ SAVED_IDS
    *
    * SMP: Same implicit races as above.
    */
    @@ -615,7 +615,7 @@ static int set_user(struct cred *new)
    *
    * The general idea is that a program which uses just setreuid() will be
    * 100% compatible with BSD. A program which uses just setuid() will be
    - * 100% compatible with POSIX with saved IDs.
    + * 100% compatible with POSIX with saved IDs.
    */
    SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid)
    {
    @@ -666,17 +666,17 @@ error:
    abort_creds(new);
    return retval;
    }
    -
    +
    /*
    - * setuid() is implemented like SysV with SAVED_IDS
    - *
    + * setuid() is implemented like SysV with SAVED_IDS
    + *
    * Note that SAVED_ID's is deficient in that a setuid root program
    - * like sendmail, for example, cannot set its uid to be a normal
    + * like sendmail, for example, cannot set its uid to be a normal
    * user and then switch back, because if you're root, setuid() sets
    * the saved uid too. If you don't like this, blame the bright people
    * in the POSIX committee and/or USG. Note that the BSD-style setreuid()
    * will allow a root program to temporarily drop privileges and be able to
    - * regain them by swapping the real and effective uid.
    + * regain them by swapping the real and effective uid.
    */
    SYSCALL_DEFINE1(setuid, uid_t, uid)
    {
    @@ -1282,7 +1282,7 @@ SYSCALL_DEFINE2(getrlimit, unsigned int, resource, struct rlimit __user *, rlim)
    /*
    * Back compatibility for getrlimit. Needed for some apps.
    */
    -
    +
    SYSCALL_DEFINE2(old_getrlimit, unsigned int, resource,
    struct rlimit __user *, rlim)
    {
    @@ -1297,7 +1297,7 @@ SYSCALL_DEFINE2(old_getrlimit, unsigned int, resource,
    x.rlim_cur = 0x7FFFFFFF;
    if (x.rlim_max > 0x7FFFFFFF)
    x.rlim_max = 0x7FFFFFFF;
    - return copy_to_user(rlim, &x, sizeof(x))?-EFAULT:0;
    + return copy_to_user(rlim, &x, sizeof(x)) ? -EFAULT : 0;
    }

    #endif
    --
    1.7.4.4


    \
     
     \ /
      Last update: 2011-06-07 18:01    [W:0.047 / U:0.700 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site