[PATCH 0/148] include/asm-x86: checkpatch cleanups - formatting only - Kernel

This is a discussion on [PATCH 0/148] include/asm-x86: checkpatch cleanups - formatting only - Kernel ; Signed-off-by: Joe Perches --- include/asm-x86/resume-trace.h | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h index 46f725b..2557514 100644 --- a/include/asm-x86/resume-trace.h +++ b/include/asm-x86/resume-trace.h @@ -3,16 +3,17 @@ #include -#define TRACE_RESUME(user) do { \ +#define TRACE_RESUME(user) \ +do ...

+ Reply to Thread
Page 3 of 10 FirstFirst 1 2 3 4 5 ... LastLast
Results 41 to 60 of 190

Thread: [PATCH 0/148] include/asm-x86: checkpatch cleanups - formatting only

  1. [PATCH 104/148] include/asm-x86/resume-trace.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/resume-trace.h | 15 ++++++++-------
    1 files changed, 8 insertions(+), 7 deletions(-)

    diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h
    index 46f725b..2557514 100644
    --- a/include/asm-x86/resume-trace.h
    +++ b/include/asm-x86/resume-trace.h
    @@ -3,16 +3,17 @@

    #include

    -#define TRACE_RESUME(user) do { \
    +#define TRACE_RESUME(user) \
    +do { \
    if (pm_trace_enabled) { \
    void *tracedata; \
    asm volatile(_ASM_MOV_UL " $1f,%0\n" \
    - ".section .tracedata,\"a\"\n" \
    - "1:\t.word %c1\n\t" \
    - _ASM_PTR " %c2\n" \
    - ".previous" \
    - :"=r" (tracedata) \
    - : "i" (__LINE__), "i" (__FILE__)); \
    + ".section .tracedata,\"a\"\n" \
    + "1:\t.word %c1\n\t" \
    + _ASM_PTR " %c2\n" \
    + ".previous" \
    + :"=r" (tracedata) \
    + : "i" (__LINE__), "i" (__FILE__)); \
    generate_resume_trace(tracedata, user); \
    } \
    } while (0)
    --
    1.5.4.rc2

    --
    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/

  2. [PATCH 115/148] include/asm-x86/smp_64.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/smp_64.h | 6 +++---
    1 files changed, 3 insertions(+), 3 deletions(-)

    diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h
    index fd709cb..c53a011 100644
    --- a/include/asm-x86/smp_64.h
    +++ b/include/asm-x86/smp_64.h
    @@ -24,9 +24,9 @@ extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *),
    #define raw_smp_processor_id() read_pda(cpunumber)

    #define stack_smp_processor_id() \
    - ({ \
    +({ \
    struct thread_info *ti; \
    - __asm__("andq %%rsp,%0; ":"=r" (ti) : "0" (CURRENT_MASK)); \
    + asm("andq %%rsp,%0; ":"=r" (ti) : "0" (CURRENT_MASK)); \
    ti->cpu; \
    })

    @@ -46,7 +46,7 @@ static inline int num_booting_cpus(void)

    #define safe_smp_processor_id() smp_processor_id()

    -static __inline int logical_smp_processor_id(void)
    +static inline int logical_smp_processor_id(void)
    {
    /* we don't want to mark this access volatile - bad code generation */
    return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
    --
    1.5.4.rc2

    --
    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/

  3. [PATCH 108/148] include/asm-x86/semaphore_64.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/semaphore_64.h | 98 +++++++++++++++++++---------------------
    1 files changed, 47 insertions(+), 51 deletions(-)

    diff --git a/include/asm-x86/semaphore_64.h b/include/asm-x86/semaphore_64.h
    index 7969430..5835d8e 100644
    --- a/include/asm-x86/semaphore_64.h
    +++ b/include/asm-x86/semaphore_64.h
    @@ -57,11 +57,11 @@ struct semaphore {
    }

    #define __DECLARE_SEMAPHORE_GENERIC(name,count) \
    - struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
    + struct semaphore name = __SEMAPHORE_INITIALIZER(name, count)

    -#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
    +#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1)

    -static inline void sema_init (struct semaphore *sem, int val)
    +static inline void sema_init(struct semaphore *sem, int val)
    {
    /*
    * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
    @@ -74,12 +74,12 @@ static inline void sema_init (struct semaphore *sem, int val)
    init_waitqueue_head(&sem->wait);
    }

    -static inline void init_MUTEX (struct semaphore *sem)
    +static inline void init_MUTEX(struct semaphore *sem)
    {
    sema_init(sem, 1);
    }

    -static inline void init_MUTEX_LOCKED (struct semaphore *sem)
    +static inline void init_MUTEX_LOCKED(struct semaphore *sem)
    {
    sema_init(sem, 0);
    }
    @@ -89,51 +89,49 @@ asmlinkage int __down_failed_interruptible(void /* params in registers */);
    asmlinkage int __down_failed_trylock(void /* params in registers */);
    asmlinkage void __up_wakeup(void /* special register calling convention */);

    -asmlinkage void __down(struct semaphore * sem);
    -asmlinkage int __down_interruptible(struct semaphore * sem);
    -asmlinkage int __down_trylock(struct semaphore * sem);
    -asmlinkage void __up(struct semaphore * sem);
    +asmlinkage void __down(struct semaphore *sem);
    +asmlinkage int __down_interruptible(struct semaphore *sem);
    +asmlinkage int __down_trylock(struct semaphore *sem);
    +asmlinkage void __up(struct semaphore *sem);

    /*
    * This is ugly, but we want the default case to fall through.
    * "__down_failed" is a special asm handler that calls the C
    * routine that actually waits. See arch/x86_64/kernel/semaphore.c
    */
    -static inline void down(struct semaphore * sem)
    +static inline void down(struct semaphore *sem)
    {
    might_sleep();

    - __asm__ __volatile__(
    - "# atomic down operation\n\t"
    - LOCK_PREFIX "decl %0\n\t" /* --sem->count */
    - "jns 1f\n\t"
    - "call __down_failed\n"
    - "1:"
    - :"=m" (sem->count)
    - :"D" (sem)
    - :"memory");
    + asm volatile("# atomic down operation\n\t"
    + LOCK_PREFIX "decl %0\n\t" /* --sem->count */
    + "jns 1f\n\t"
    + "call __down_failed\n"
    + "1:"
    + : "=m" (sem->count)
    + : "D" (sem)
    + : "memory");
    }

    /*
    * Interruptible try to acquire a semaphore. If we obtained
    * it, return zero. If we were interrupted, returns -EINTR
    */
    -static inline int down_interruptible(struct semaphore * sem)
    +static inline int down_interruptible(struct semaphore *sem)
    {
    int result;

    might_sleep();

    - __asm__ __volatile__(
    - "# atomic interruptible down operation\n\t"
    - "xorl %0,%0\n\t"
    - LOCK_PREFIX "decl %1\n\t" /* --sem->count */
    - "jns 2f\n\t"
    - "call __down_failed_interruptible\n"
    - "2:\n"
    - :"=&a" (result), "=m" (sem->count)
    - :"D" (sem)
    - :"memory");
    + asm volatile("# atomic interruptible down operation\n\t"
    + "xorl %0,%0\n\t"
    + LOCK_PREFIX "decl %1\n\t" /* --sem->count */
    + "jns 2f\n\t"
    + "call __down_failed_interruptible\n"
    + "2:\n"
    + : "=&a" (result), "=m" (sem->count)
    + : "D" (sem)
    + : "memory");
    return result;
    }

    @@ -141,20 +139,19 @@ static inline int down_interruptible(struct semaphore * sem)
    * Non-blockingly attempt to down() a semaphore.
    * Returns zero if we acquired it
    */
    -static inline int down_trylock(struct semaphore * sem)
    +static inline int down_trylock(struct semaphore *sem)
    {
    int result;

    - __asm__ __volatile__(
    - "# atomic interruptible down operation\n\t"
    - "xorl %0,%0\n\t"
    - LOCK_PREFIX "decl %1\n\t" /* --sem->count */
    - "jns 2f\n\t"
    - "call __down_failed_trylock\n\t"
    - "2:\n"
    - :"=&a" (result), "=m" (sem->count)
    - :"D" (sem)
    - :"memory","cc");
    + asm volatile("# atomic interruptible down operation\n\t"
    + "xorl %0,%0\n\t"
    + LOCK_PREFIX "decl %1\n\t" /* --sem->count */
    + "jns 2f\n\t"
    + "call __down_failed_trylock\n\t"
    + "2:\n"
    + : "=&a" (result), "=m" (sem->count)
    + : "D" (sem)
    + : "memory", "cc");
    return result;
    }

    @@ -164,17 +161,16 @@ static inline int down_trylock(struct semaphore * sem)
    * The default case (no contention) will result in NO
    * jumps for both down() and up().
    */
    -static inline void up(struct semaphore * sem)
    +static inline void up(struct semaphore *sem)
    {
    - __asm__ __volatile__(
    - "# atomic up operation\n\t"
    - LOCK_PREFIX "incl %0\n\t" /* ++sem->count */
    - "jg 1f\n\t"
    - "call __up_wakeup\n"
    - "1:"
    - :"=m" (sem->count)
    - :"D" (sem)
    - :"memory");
    + asm volatile("# atomic up operation\n\t"
    + LOCK_PREFIX "incl %0\n\t" /* ++sem->count */
    + "jg 1f\n\t"
    + "call __up_wakeup\n"
    + "1:"
    + : "=m" (sem->count)
    + : "D" (sem)
    + : "memory");
    }
    #endif /* __KERNEL__ */
    #endif
    --
    1.5.4.rc2

    --
    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/

  4. [PATCH 003/148] include/asm-x86/a.out-core.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/a.out-core.h | 12 +++++++-----
    1 files changed, 7 insertions(+), 5 deletions(-)

    diff --git a/include/asm-x86/a.out-core.h b/include/asm-x86/a.out-core.h
    index d2b6e11..714207a 100644
    --- a/include/asm-x86/a.out-core.h
    +++ b/include/asm-x86/a.out-core.h
    @@ -29,8 +29,9 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
    dump->magic = CMAGIC;
    dump->start_code = 0;
    dump->start_stack = regs->sp & ~(PAGE_SIZE - 1);
    - dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
    - dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
    + dump->u_tsize = ((unsigned long)current->mm->end_code) >> PAGE_SHIFT;
    + dump->u_dsize = ((unsigned long)(current->mm->brk + (PAGE_SIZE - 1)))
    + >> PAGE_SHIFT;
    dump->u_dsize -= dump->u_tsize;
    dump->u_ssize = 0;
    dump->u_debugreg[0] = current->thread.debugreg0;
    @@ -43,7 +44,8 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
    dump->u_debugreg[7] = current->thread.debugreg7;

    if (dump->start_stack < TASK_SIZE)
    - dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
    + dump->u_ssize = ((unsigned long)(TASK_SIZE - dump->start_stack))
    + >> PAGE_SHIFT;

    dump->regs.bx = regs->bx;
    dump->regs.cx = regs->cx;
    @@ -55,7 +57,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
    dump->regs.ds = (u16)regs->ds;
    dump->regs.es = (u16)regs->es;
    dump->regs.fs = (u16)regs->fs;
    - savesegment(gs,gs);
    + savesegment(gs, gs);
    dump->regs.orig_ax = regs->orig_ax;
    dump->regs.ip = regs->ip;
    dump->regs.cs = (u16)regs->cs;
    @@ -63,7 +65,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
    dump->regs.sp = regs->sp;
    dump->regs.ss = (u16)regs->ss;

    - dump->u_fpvalid = dump_fpu (regs, &dump->i387);
    + dump->u_fpvalid = dump_fpu(regs, &dump->i387);
    }

    #endif /* CONFIG_X86_32 */
    --
    1.5.4.rc2

    --
    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/

  5. [PATCH 099/148] include/asm-x86/posix_types_64.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/posix_types_64.h | 54 +++++++++++++++++++-------------------
    1 files changed, 27 insertions(+), 27 deletions(-)

    diff --git a/include/asm-x86/posix_types_64.h b/include/asm-x86/posix_types_64.h
    index 9926aa4..93e8467 100644
    --- a/include/asm-x86/posix_types_64.h
    +++ b/include/asm-x86/posix_types_64.h
    @@ -46,7 +46,7 @@ typedef unsigned long __kernel_old_dev_t;
    #ifdef __KERNEL__

    #undef __FD_SET
    -static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
    + {
    unsigned long _tmp = fd / __NFDBITS;
    unsigned long _rem = fd % __NFDBITS;
    @@ -54,7 +54,7 @@ static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
    }

    #undef __FD_CLR
    -static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
    +static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
    {
    unsigned long _tmp = fd / __NFDBITS;
    unsigned long _rem = fd % __NFDBITS;
    @@ -62,7 +62,7 @@ static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
    }

    #undef __FD_ISSET
    -static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p)
    +static inline int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p)
    {
    unsigned long _tmp = fd / __NFDBITS;
    unsigned long _rem = fd % __NFDBITS;
    @@ -74,36 +74,36 @@ static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p)
    * for 256 and 1024-bit fd_sets respectively)
    */
    #undef __FD_ZERO
    -static __inline__ void __FD_ZERO(__kernel_fd_set *p)
    +static inline void __FD_ZERO(__kernel_fd_set *p)
    {
    unsigned long *tmp = p->fds_bits;
    int i;

    if (__builtin_constant_p(__FDSET_LONGS)) {
    switch (__FDSET_LONGS) {
    - case 32:
    - tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
    - tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
    - tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
    - tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
    - tmp[16] = 0; tmp[17] = 0; tmp[18] = 0; tmp[19] = 0;
    - tmp[20] = 0; tmp[21] = 0; tmp[22] = 0; tmp[23] = 0;
    - tmp[24] = 0; tmp[25] = 0; tmp[26] = 0; tmp[27] = 0;
    - tmp[28] = 0; tmp[29] = 0; tmp[30] = 0; tmp[31] = 0;
    - return;
    - case 16:
    - tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
    - tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
    - tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
    - tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
    - return;
    - case 8:
    - tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
    - tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
    - return;
    - case 4:
    - tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
    - return;
    + case 32:
    + tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
    + tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
    + tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
    + tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
    + tmp[16] = 0; tmp[17] = 0; tmp[18] = 0; tmp[19] = 0;
    + tmp[20] = 0; tmp[21] = 0; tmp[22] = 0; tmp[23] = 0;
    + tmp[24] = 0; tmp[25] = 0; tmp[26] = 0; tmp[27] = 0;
    + tmp[28] = 0; tmp[29] = 0; tmp[30] = 0; tmp[31] = 0;
    + return;
    + case 16:
    + tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
    + tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
    + tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
    + tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
    + return;
    + case 8:
    + tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
    + tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
    + return;
    + case 4:
    + tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
    + return;
    }
    }
    i = __FDSET_LONGS;
    --
    1.5.4.rc2

    --
    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/

  6. [PATCH 038/148] include/asm-x86/genapic_32.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/genapic_32.h | 89 +++++++++++++++++++++---------------------
    1 files changed, 45 insertions(+), 44 deletions(-)

    diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h
    index b501ae7..5fa893d 100644
    --- a/include/asm-x86/genapic_32.h
    +++ b/include/asm-x86/genapic_32.h
    @@ -18,18 +18,18 @@ struct mpc_config_bus;
    struct mp_config_table;
    struct mpc_config_processor;

    -struct genapic {
    - char *name;
    - int (*probe)(void);
    +struct genapic {
    + char *name;
    + int (*probe)(void);

    int (*apic_id_registered)(void);
    cpumask_t (*target_cpus)(void);
    int int_delivery_mode;
    - int int_dest_mode;
    + int int_dest_mode;
    int ESR_DISABLE;
    int apic_destination_logical;
    unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
    - unsigned long (*check_apicid_present)(int apicid);
    + unsigned long (*check_apicid_present)(int apicid);
    int no_balance_irq;
    int no_ioapic_check;
    void (*init_apic_ldr)(void);
    @@ -37,21 +37,21 @@ struct genapic {

    void (*setup_apic_routing)(void);
    int (*multi_timer_check)(int apic, int irq);
    - int (*apicid_to_node)(int logical_apicid);
    + int (*apicid_to_node)(int logical_apicid);
    int (*cpu_to_logical_apicid)(int cpu);
    int (*cpu_present_to_apicid)(int mps_cpu);
    physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
    - void (*setup_portio_remap)(void);
    + void (*setup_portio_remap)(void);
    int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
    void (*enable_apic_mode)(void);
    u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);

    /* mpparse */
    /* When one of the next two hooks returns 1 the genapic
    - is switched to this. Essentially they are additional probe
    + is switched to this. Essentially they are additional probe
    functions. */
    - int (*mps_oem_check)(struct mp_config_table *mpc, char *oem,
    - char *productid);
    + int (*mps_oem_check)(struct mp_config_table *mpc, char *oem,
    + char *productid);
    int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);

    unsigned (*get_apic_id)(unsigned long x);
    @@ -64,7 +64,7 @@ struct genapic {
    void (*send_IPI_allbutself)(int vector);
    void (*send_IPI_all)(int vector);
    #endif
    -};
    +};

    #define APICFUNC(x) .x = x,

    @@ -77,39 +77,40 @@ struct genapic {
    #define IPIFUNC(x)
    #endif

    -#define APIC_INIT(aname, aprobe) { \
    - .name = aname, \
    - .probe = aprobe, \
    - .int_delivery_mode = INT_DELIVERY_MODE, \
    - .int_dest_mode = INT_DEST_MODE, \
    - .no_balance_irq = NO_BALANCE_IRQ, \
    - .ESR_DISABLE = esr_disable, \
    - .apic_destination_logical = APIC_DEST_LOGICAL, \
    - APICFUNC(apic_id_registered) \
    - APICFUNC(target_cpus) \
    - APICFUNC(check_apicid_used) \
    - APICFUNC(check_apicid_present) \
    - APICFUNC(init_apic_ldr) \
    - APICFUNC(ioapic_phys_id_map) \
    - APICFUNC(setup_apic_routing) \
    - APICFUNC(multi_timer_check) \
    - APICFUNC(apicid_to_node) \
    - APICFUNC(cpu_to_logical_apicid) \
    - APICFUNC(cpu_present_to_apicid) \
    - APICFUNC(apicid_to_cpu_present) \
    - APICFUNC(setup_portio_remap) \
    - APICFUNC(check_phys_apicid_present) \
    - APICFUNC(mps_oem_check) \
    - APICFUNC(get_apic_id) \
    - .apic_id_mask = APIC_ID_MASK, \
    - APICFUNC(cpu_mask_to_apicid) \
    - APICFUNC(acpi_madt_oem_check) \
    - IPIFUNC(send_IPI_mask) \
    - IPIFUNC(send_IPI_allbutself) \
    - IPIFUNC(send_IPI_all) \
    - APICFUNC(enable_apic_mode) \
    - APICFUNC(phys_pkg_id) \
    - }
    +#define APIC_INIT(aname, aprobe) \
    +{ \
    + .name = aname, \
    + .probe = aprobe, \
    + .int_delivery_mode = INT_DELIVERY_MODE, \
    + .int_dest_mode = INT_DEST_MODE, \
    + .no_balance_irq = NO_BALANCE_IRQ, \
    + .ESR_DISABLE = esr_disable, \
    + .apic_destination_logical = APIC_DEST_LOGICAL, \
    + APICFUNC(apic_id_registered) \
    + APICFUNC(target_cpus) \
    + APICFUNC(check_apicid_used) \
    + APICFUNC(check_apicid_present) \
    + APICFUNC(init_apic_ldr) \
    + APICFUNC(ioapic_phys_id_map) \
    + APICFUNC(setup_apic_routing) \
    + APICFUNC(multi_timer_check) \
    + APICFUNC(apicid_to_node) \
    + APICFUNC(cpu_to_logical_apicid) \
    + APICFUNC(cpu_present_to_apicid) \
    + APICFUNC(apicid_to_cpu_present) \
    + APICFUNC(setup_portio_remap) \
    + APICFUNC(check_phys_apicid_present) \
    + APICFUNC(mps_oem_check) \
    + APICFUNC(get_apic_id) \
    + .apic_id_mask = APIC_ID_MASK, \
    + APICFUNC(cpu_mask_to_apicid) \
    + APICFUNC(acpi_madt_oem_check) \
    + IPIFUNC(send_IPI_mask) \
    + IPIFUNC(send_IPI_allbutself) \
    + IPIFUNC(send_IPI_all) \
    + APICFUNC(enable_apic_mode) \
    + APICFUNC(phys_pkg_id) \
    +}

    extern struct genapic *genapic;

    --
    1.5.4.rc2

    --
    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/

  7. [PATCH 069/148] include/asm-x86/mmu.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/mmu.h | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/include/asm-x86/mmu.h b/include/asm-x86/mmu.h
    index efa962c..00e8867 100644
    --- a/include/asm-x86/mmu.h
    +++ b/include/asm-x86/mmu.h
    @@ -10,10 +10,10 @@
    *
    * cpu_vm_mask is used to optimize ldt flushing.
    */
    -typedef struct {
    +typedef struct {
    void *ldt;
    #ifdef CONFIG_X86_64
    - rwlock_t ldtlock;
    + rwlock_t ldtlock;
    #endif
    int size;
    struct mutex lock;
    --
    1.5.4.rc2

    --
    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/

  8. [PATCH 042/148] include/asm-x86/hypertransport.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/hypertransport.h | 15 +++++++++------
    1 files changed, 9 insertions(+), 6 deletions(-)

    diff --git a/include/asm-x86/hypertransport.h b/include/asm-x86/hypertransport.h
    index c16c6ff..d2bbd23 100644
    --- a/include/asm-x86/hypertransport.h
    +++ b/include/asm-x86/hypertransport.h
    @@ -8,12 +8,14 @@
    #define HT_IRQ_LOW_BASE 0xf8000000

    #define HT_IRQ_LOW_VECTOR_SHIFT 16
    -#define HT_IRQ_LOW_VECTOR_MASK 0x00ff0000
    -#define HT_IRQ_LOW_VECTOR(v) (((v) << HT_IRQ_LOW_VECTOR_SHIFT) & HT_IRQ_LOW_VECTOR_MASK)
    +#define HT_IRQ_LOW_VECTOR_MASK 0x00ff0000
    +#define HT_IRQ_LOW_VECTOR(v) \
    + (((v) << HT_IRQ_LOW_VECTOR_SHIFT) & HT_IRQ_LOW_VECTOR_MASK)

    #define HT_IRQ_LOW_DEST_ID_SHIFT 8
    -#define HT_IRQ_LOW_DEST_ID_MASK 0x0000ff00
    -#define HT_IRQ_LOW_DEST_ID(v) (((v) << HT_IRQ_LOW_DEST_ID_SHIFT) & HT_IRQ_LOW_DEST_ID_MASK)
    +#define HT_IRQ_LOW_DEST_ID_MASK 0x0000ff00
    +#define HT_IRQ_LOW_DEST_ID(v) \
    + (((v) << HT_IRQ_LOW_DEST_ID_SHIFT) & HT_IRQ_LOW_DEST_ID_MASK)

    #define HT_IRQ_LOW_DM_PHYSICAL 0x0000000
    #define HT_IRQ_LOW_DM_LOGICAL 0x0000040
    @@ -36,7 +38,8 @@


    #define HT_IRQ_HIGH_DEST_ID_SHIFT 0
    -#define HT_IRQ_HIGH_DEST_ID_MASK 0x00ffffff
    -#define HT_IRQ_HIGH_DEST_ID(v) ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK)
    +#define HT_IRQ_HIGH_DEST_ID_MASK 0x00ffffff
    +#define HT_IRQ_HIGH_DEST_ID(v) \
    + ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK)

    #endif /* ASM_HYPERTRANSPORT_H */
    --
    1.5.4.rc2

    --
    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/

  9. [PATCH 132/148] include/asm-x86/tsc.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/tsc.h | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/include/asm-x86/tsc.h b/include/asm-x86/tsc.h
    index 7d3e27f..d2d8eb5 100644
    --- a/include/asm-x86/tsc.h
    +++ b/include/asm-x86/tsc.h
    @@ -42,7 +42,7 @@ static inline cycles_t vget_cycles(void)
    if (!cpu_has_tsc)
    return 0;
    #endif
    - return (cycles_t) __native_read_tsc();
    + return (cycles_t)__native_read_tsc();
    }

    extern void tsc_init(void);
    --
    1.5.4.rc2

    --
    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/

  10. [PATCH 072/148] include/asm-x86/mmzone_64.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/mmzone_64.h | 24 ++++++++++++------------
    1 files changed, 12 insertions(+), 12 deletions(-)

    diff --git a/include/asm-x86/mmzone_64.h b/include/asm-x86/mmzone_64.h
    index ebaf966..594bd0d 100644
    --- a/include/asm-x86/mmzone_64.h
    +++ b/include/asm-x86/mmzone_64.h
    @@ -7,7 +7,7 @@

    #ifdef CONFIG_NUMA

    -#define VIRTUAL_BUG_ON(x)
    +#define VIRTUAL_BUG_ON(x)

    #include

    @@ -16,7 +16,7 @@ struct memnode {
    int shift;
    unsigned int mapsize;
    s16 *map;
    - s16 embedded_map[64-8];
    + s16 embedded_map[64 - 8];
    } ____cacheline_aligned; /* total size = 128 bytes */
    extern struct memnode memnode;
    #define memnode_shift memnode.shift
    @@ -25,27 +25,27 @@ extern struct memnode memnode;

    extern struct pglist_data *node_data[];

    -static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)
    -{
    - unsigned nid;
    +static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)
    +{
    + unsigned nid;
    VIRTUAL_BUG_ON(!memnodemap);
    VIRTUAL_BUG_ON((addr >> memnode_shift) >= memnodemapsize);
    - nid = memnodemap[addr >> memnode_shift];
    - VIRTUAL_BUG_ON(nid >= MAX_NUMNODES || !node_data[nid]);
    - return nid;
    -}
    + nid = memnodemap[addr >> memnode_shift];
    + VIRTUAL_BUG_ON(nid >= MAX_NUMNODES || !node_data[nid]);
    + return nid;
    +}

    #define NODE_DATA(nid) (node_data[nid])

    #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
    -#define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \
    +#define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \
    NODE_DATA(nid)->node_spanned_pages)

    extern int early_pfn_to_nid(unsigned long pfn);

    #ifdef CONFIG_NUMA_EMU
    -#define FAKE_NODE_MIN_SIZE (64*1024*1024)
    -#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1uL))
    +#define FAKE_NODE_MIN_SIZE (64 * 1024 * 1024)
    +#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
    #endif

    #endif
    --
    1.5.4.rc2

    --
    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/

  11. [PATCH 039/148] include/asm-x86/geode.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/geode.h | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h
    index c208398..b1bdf63 100644
    --- a/include/asm-x86/geode.h
    +++ b/include/asm-x86/geode.h
    @@ -177,7 +177,7 @@ static inline int is_geode(void)
    /* MFGPTs */

    #define MFGPT_MAX_TIMERS 8
    -#define MFGPT_TIMER_ANY -1
    +#define MFGPT_TIMER_ANY (-1)

    #define MFGPT_DOMAIN_WORKING 1
    #define MFGPT_DOMAIN_STANDBY 2
    --
    1.5.4.rc2

    --
    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/

  12. [PATCH 073/148] include/asm-x86/mpspec_def.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/mpspec_def.h | 35 +++++++++++++----------------------
    1 files changed, 13 insertions(+), 22 deletions(-)

    diff --git a/include/asm-x86/mpspec_def.h b/include/asm-x86/mpspec_def.h
    index 1f35691..dc6ef85 100644
    --- a/include/asm-x86/mpspec_def.h
    +++ b/include/asm-x86/mpspec_def.h
    @@ -11,7 +11,7 @@
    * information is.
    */

    -#define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_')
    +#define SMP_MAGIC_IDENT (('_'<<24) | ('P'<<16) | ('M'<<8) | '_')

    #ifdef CONFIG_X86_32
    # define MAX_MPC_ENTRY 1024
    @@ -23,8 +23,7 @@
    # define MAX_APICS 255
    #endif

    -struct intel_mp_floating
    -{
    +struct intel_mp_floating {
    char mpf_signature[4]; /* "_MP_" */
    unsigned int mpf_physptr; /* Configuration table address */
    unsigned char mpf_length; /* Our length (paragraphs) */
    @@ -39,14 +38,13 @@ struct intel_mp_floating

    #define MPC_SIGNATURE "PCMP"

    -struct mp_config_table
    -{
    +struct mp_config_table {
    char mpc_signature[4];
    unsigned short mpc_length; /* Size of table */
    - char mpc_spec; /* 0x01 */
    - char mpc_checksum;
    - char mpc_oem[8];
    - char mpc_productid[12];
    + char mpc_spec; /* 0x01 */
    + char mpc_checksum;
    + char mpc_oem[8];
    + char mpc_productid[12];
    unsigned int mpc_oemptr; /* 0 if not present */
    unsigned short mpc_oemsize; /* 0 if not present */
    unsigned short mpc_oemcount;
    @@ -71,8 +69,7 @@ struct mp_config_table
    #define CPU_MODEL_MASK 0x00F0
    #define CPU_FAMILY_MASK 0x0F00

    -struct mpc_config_processor
    -{
    +struct mpc_config_processor {
    unsigned char mpc_type;
    unsigned char mpc_apicid; /* Local APIC number */
    unsigned char mpc_apicver; /* Its versions */
    @@ -82,8 +79,7 @@ struct mpc_config_processor
    unsigned int mpc_reserved[2];
    };

    -struct mpc_config_bus
    -{
    +struct mpc_config_bus {
    unsigned char mpc_type;
    unsigned char mpc_busid;
    unsigned char mpc_bustype[6];
    @@ -111,8 +107,7 @@ struct mpc_config_bus

    #define MPC_APIC_USABLE 0x01

    -struct mpc_config_ioapic
    -{
    +struct mpc_config_ioapic {
    unsigned char mpc_type;
    unsigned char mpc_apicid;
    unsigned char mpc_apicver;
    @@ -120,8 +115,7 @@ struct mpc_config_ioapic
    unsigned int mpc_apicaddr;
    };

    -struct mpc_config_intsrc
    -{
    +struct mpc_config_intsrc {
    unsigned char mpc_type;
    unsigned char mpc_irqtype;
    unsigned short mpc_irqflag;
    @@ -144,8 +138,7 @@ enum mp_irq_source_types {

    #define MP_APIC_ALL 0xFF

    -struct mpc_config_lintsrc
    -{
    +struct mpc_config_lintsrc {
    unsigned char mpc_type;
    unsigned char mpc_irqtype;
    unsigned short mpc_irqflag;
    @@ -157,8 +150,7 @@ struct mpc_config_lintsrc

    #define MPC_OEM_SIGNATURE "_OEM"

    -struct mp_config_oemtable
    -{
    +struct mp_config_oemtable {
    char oem_signature[4];
    unsigned short oem_length; /* Size of table */
    char oem_rev; /* 0x01 */
    @@ -185,4 +177,3 @@ enum mp_bustype {
    MP_BUS_MCA,
    };
    #endif
    -
    --
    1.5.4.rc2

    --
    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/

  13. [PATCH 109/148] include/asm-x86/serial.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/serial.h | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/include/asm-x86/serial.h b/include/asm-x86/serial.h
    index 628c801..ae8370f 100644
    --- a/include/asm-x86/serial.h
    +++ b/include/asm-x86/serial.h
    @@ -8,7 +8,7 @@
    * clock, since the 16550A is capable of handling a top speed of 1.5
    * megabits/second; but this requires the faster clock.
    */
    -#define BASE_BAUD ( 1843200 / 16 )
    +#define BASE_BAUD (1843200 / 16)

    /* Standard COM flags (except for COM4, because of the 8514 problem) */
    #ifdef CONFIG_SERIAL_DETECT_IRQ
    --
    1.5.4.rc2

    --
    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/

  14. [PATCH 133/148] include/asm-x86/uaccess_32.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/uaccess_32.h | 316 +++++++++++++++++++++++++-----------------
    1 files changed, 187 insertions(+), 129 deletions(-)

    diff --git a/include/asm-x86/uaccess_32.h b/include/asm-x86/uaccess_32.h
    index fcc570e..8e7595c 100644
    --- a/include/asm-x86/uaccess_32.h
    +++ b/include/asm-x86/uaccess_32.h
    @@ -32,7 +32,7 @@
    #define get_fs() (current_thread_info()->addr_limit)
    #define set_fs(x) (current_thread_info()->addr_limit = (x))

    -#define segment_eq(a,b) ((a).seg == (b).seg)
    +#define segment_eq(a, b) ((a).seg == (b).seg)

    /*
    * movsl can be slow when source and dest are not both 8-byte aligned
    @@ -43,7 +43,9 @@ extern struct movsl_mask {
    } ____cacheline_aligned_in_smp movsl_mask;
    #endif

    -#define __addr_ok(addr) ((unsigned long __force)(addr) < (current_thread_info()->addr_limit.seg))
    +#define __addr_ok(addr) \
    + ((unsigned long __force)(addr) < \
    + (current_thread_info()->addr_limit.seg))

    /*
    * Test whether a block of memory is a valid user space address.
    @@ -54,13 +56,16 @@ extern struct movsl_mask {
    *
    * This needs 33-bit arithmetic. We have a carry...
    */
    -#define __range_ok(addr,size) ({ \
    - unsigned long flag,roksum; \
    - __chk_user_ptr(addr); \
    - asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
    - :"=&r" (flag), "=r" (roksum) \
    - :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \
    - flag; })
    +#define __range_ok(addr, size) \
    +({ \
    + unsigned long flag, roksum; \
    + __chk_user_ptr(addr); \
    + asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
    + :"=&r" (flag), "=r" (roksum) \
    + :"1" (addr), "g" ((int)(size)), \
    + "rm" (current_thread_info()->addr_limit.seg)); \
    + flag; \
    +})

    /**
    * access_ok: - Checks if a user space pointer is valid
    @@ -81,7 +86,7 @@ extern struct movsl_mask {
    * checks that the pointer is in the user space range - after calling
    * this function, memory access functions may still return -EFAULT.
    */
    -#define access_ok(type,addr,size) (likely(__range_ok(addr,size) == 0))
    +#define access_ok(type, addr, size) (likely(__range_ok(addr, size) == 0))

    /*
    * The exception table consists of pairs of addresses: the first is the
    @@ -96,8 +101,7 @@ extern struct movsl_mask {
    * on our cache or tlb entries.
    */

    -struct exception_table_entry
    -{
    +struct exception_table_entry {
    unsigned long insn, fixup;
    };

    @@ -122,13 +126,15 @@ extern void __get_user_1(void);
    extern void __get_user_2(void);
    extern void __get_user_4(void);

    -#define __get_user_x(size,ret,x,ptr) \
    - __asm__ __volatile__("call __get_user_" #size \
    - :"=a" (ret),"=d" (x) \
    - :"0" (ptr))
    +#define __get_user_x(size, ret, x, ptr) \
    + asm volatile("call __get_user_" #size \
    + :"=a" (ret),"=d" (x) \
    + :"0" (ptr))
    +

    +/* Careful: we have to cast the result to the type of the pointer
    + * for sign reasons */

    -/* Careful: we have to cast the result to the type of the pointer for sign reasons */
    /**
    * get_user: - Get a simple variable from user space.
    * @x: Variable to store result.
    @@ -146,15 +152,24 @@ extern void __get_user_4(void);
    * Returns zero on success, or -EFAULT on error.
    * On error, the variable @x is set to zero.
    */
    -#define get_user(x,ptr) \
    -({ int __ret_gu; \
    +#define get_user(x, ptr) \
    +({ \
    + int __ret_gu; \
    unsigned long __val_gu; \
    __chk_user_ptr(ptr); \
    - switch(sizeof (*(ptr))) { \
    - case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \
    - case 2: __get_user_x(2,__ret_gu,__val_gu,ptr); break; \
    - case 4: __get_user_x(4,__ret_gu,__val_gu,ptr); break; \
    - default: __get_user_x(X,__ret_gu,__val_gu,ptr); break; \
    + switch (sizeof(*(ptr))) { \
    + case 1: \
    + __get_user_x(1, __ret_gu, __val_gu, ptr); \
    + break; \
    + case 2: \
    + __get_user_x(2, __ret_gu, __val_gu, ptr); \
    + break; \
    + case 4: \
    + __get_user_x(4, __ret_gu, __val_gu, ptr); \
    + break; \
    + default: \
    + __get_user_x(X, __ret_gu, __val_gu, ptr); \
    + break; \
    } \
    (x) = (__typeof__(*(ptr)))__val_gu; \
    __ret_gu; \
    @@ -171,11 +186,25 @@ extern void __put_user_2(void);
    extern void __put_user_4(void);
    extern void __put_user_8(void);

    -#define __put_user_1(x, ptr) __asm__ __volatile__("call __put_user_1":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr))
    -#define __put_user_2(x, ptr) __asm__ __volatile__("call __put_user_2":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr))
    -#define __put_user_4(x, ptr) __asm__ __volatile__("call __put_user_4":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr))
    -#define __put_user_8(x, ptr) __asm__ __volatile__("call __put_user_8":"=a" (__ret_pu):"A" ((typeof(*(ptr)))(x)), "c" (ptr))
    -#define __put_user_X(x, ptr) __asm__ __volatile__("call __put_user_X":"=a" (__ret_pu):"c" (ptr))
    +#define __put_user_1(x, ptr) \
    + asm volatile("call __put_user_1" : "=a" (__ret_pu) \
    + : "0" ((typeof(*(ptr)))(x)), "c" (ptr))
    +
    +#define __put_user_2(x, ptr) \
    + asm volatile("call __put_user_2" : "=a" (__ret_pu) \
    + : "0" ((typeof(*(ptr)))(x)), "c" (ptr))
    +
    +#define __put_user_4(x, ptr) \
    + asm volatile("call __put_user_4" : "=a" (__ret_pu) \
    + : "0" ((typeof(*(ptr)))(x)), "c" (ptr))
    +
    +#define __put_user_8(x, ptr) \
    + asm volatile("call __put_user_8" : "=a" (__ret_pu) \
    + : "A" ((typeof(*(ptr)))(x)), "c" (ptr))
    +
    +#define __put_user_X(x, ptr) \
    + asm volatile("call __put_user_X" : "=a" (__ret_pu) \
    + : "c" (ptr))

    /**
    * put_user: - Write a simple value into user space.
    @@ -195,32 +224,43 @@ extern void __put_user_8(void);
    */
    #ifdef CONFIG_X86_WP_WORKS_OK

    -#define put_user(x,ptr) \
    -({ int __ret_pu; \
    +#define put_user(x, ptr) \
    +({ \
    + int __ret_pu; \
    __typeof__(*(ptr)) __pu_val; \
    __chk_user_ptr(ptr); \
    __pu_val = x; \
    - switch(sizeof(*(ptr))) { \
    - case 1: __put_user_1(__pu_val, ptr); break; \
    - case 2: __put_user_2(__pu_val, ptr); break; \
    - case 4: __put_user_4(__pu_val, ptr); break; \
    - case 8: __put_user_8(__pu_val, ptr); break; \
    - default:__put_user_X(__pu_val, ptr); break; \
    + switch (sizeof(*(ptr))) { \
    + case 1: \
    + __put_user_1(__pu_val, ptr); \
    + break; \
    + case 2: \
    + __put_user_2(__pu_val, ptr); \
    + break; \
    + case 4: \
    + __put_user_4(__pu_val, ptr); \
    + break; \
    + case 8: \
    + __put_user_8(__pu_val, ptr); \
    + break; \
    + default: \
    + __put_user_X(__pu_val, ptr); \
    + break; \
    } \
    __ret_pu; \
    })

    #else
    -#define put_user(x,ptr) \
    +#define put_user(x, ptr) \
    ({ \
    - int __ret_pu; \
    - __typeof__(*(ptr)) __pus_tmp = x; \
    - __ret_pu=0; \
    - if(unlikely(__copy_to_user_ll(ptr, &__pus_tmp, \
    - sizeof(*(ptr))) != 0)) \
    - __ret_pu=-EFAULT; \
    - __ret_pu; \
    - })
    + int __ret_pu; \
    + __typeof__(*(ptr))__pus_tmp = x; \
    + __ret_pu = 0; \
    + if (unlikely(__copy_to_user_ll(ptr, &__pus_tmp, \
    + sizeof(*(ptr))) != 0)) \
    + __ret_pu = -EFAULT; \
    + __ret_pu; \
    +})


    #endif
    @@ -245,8 +285,8 @@ extern void __put_user_8(void);
    * Returns zero on success, or -EFAULT on error.
    * On error, the variable @x is set to zero.
    */
    -#define __get_user(x,ptr) \
    - __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
    +#define __get_user(x, ptr) \
    + __get_user_nocheck((x), (ptr), sizeof(*(ptr)))


    /**
    @@ -268,54 +308,62 @@ extern void __put_user_8(void);
    *
    * Returns zero on success, or -EFAULT on error.
    */
    -#define __put_user(x,ptr) \
    - __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),s izeof(*(ptr)))
    +#define __put_user(x, ptr) \
    + __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))

    -#define __put_user_nocheck(x,ptr,size) \
    +#define __put_user_nocheck(x, ptr, size) \
    ({ \
    long __pu_err; \
    - __put_user_size((x),(ptr),(size),__pu_err,-EFAULT); \
    + __put_user_size((x), (ptr), (size), __pu_err, -EFAULT); \
    __pu_err; \
    })


    -#define __put_user_u64(x, addr, err) \
    - __asm__ __volatile__( \
    - "1: movl %%eax,0(%2)\n" \
    - "2: movl %%edx,4(%2)\n" \
    - "3:\n" \
    - ".section .fixup,\"ax\"\n" \
    - "4: movl %3,%0\n" \
    - " jmp 3b\n" \
    - ".previous\n" \
    - _ASM_EXTABLE(1b,4b) \
    - _ASM_EXTABLE(2b,4b) \
    - : "=r"(err) \
    - : "A" (x), "r" (addr), "i"(-EFAULT), "0"(err))
    +#define __put_user_u64(x, addr, err) \
    + asm volatile("1: movl %%eax,0(%2)\n" \
    + "2: movl %%edx,4(%2)\n" \
    + "3:\n" \
    + ".section .fixup,\"ax\"\n" \
    + "4: movl %3,%0\n" \
    + " jmp 3b\n" \
    + ".previous\n" \
    + _ASM_EXTABLE(1b, 4b) \
    + _ASM_EXTABLE(2b, 4b) \
    + : "=r" (err) \
    + : "A" (x), "r" (addr), "i" (-EFAULT), "0" (err))

    #ifdef CONFIG_X86_WP_WORKS_OK

    -#define __put_user_size(x,ptr,size,retval,errret) \
    +#define __put_user_size(x, ptr, size, retval, errret) \
    do { \
    retval = 0; \
    __chk_user_ptr(ptr); \
    switch (size) { \
    - case 1: __put_user_asm(x,ptr,retval,"b","b","iq",errret);break; \
    - case 2: __put_user_asm(x,ptr,retval,"w","w","ir",errret);break; \
    - case 4: __put_user_asm(x,ptr,retval,"l","","ir",errret); break; \
    - case 8: __put_user_u64((__typeof__(*ptr))(x),ptr,retval); break;\
    - default: __put_user_bad(); \
    + case 1: \
    + __put_user_asm(x, ptr, retval, "b", "b", "iq", errret); \
    + break; \
    + case 2: \
    + __put_user_asm(x, ptr, retval, "w", "w", "ir", errret); \
    + break; \
    + case 4: \
    + __put_user_asm(x, ptr, retval, "l", "", "ir", errret); \
    + break; \
    + case 8: \
    + __put_user_u64((__typeof__(*ptr))(x), ptr, retval); \
    + break; \
    + default: \
    + __put_user_bad(); \
    } \
    } while (0)

    #else

    -#define __put_user_size(x,ptr,size,retval,errret) \
    +#define __put_user_size(x, ptr, size, retval, errret) \
    do { \
    - __typeof__(*(ptr)) __pus_tmp = x; \
    + __typeof__(*(ptr))__pus_tmp = x; \
    retval = 0; \
    \
    - if(unlikely(__copy_to_user_ll(ptr, &__pus_tmp, size) != 0)) \
    + if (unlikely(__copy_to_user_ll(ptr, &__pus_tmp, size) != 0)) \
    retval = errret; \
    } while (0)

    @@ -329,65 +377,70 @@ struct __large_struct { unsigned long buf[100]; };
    * aliasing issues.
    */
    #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
    - __asm__ __volatile__( \
    - "1: mov"itype" %"rtype"1,%2\n" \
    - "2:\n" \
    - ".section .fixup,\"ax\"\n" \
    - "3: movl %3,%0\n" \
    - " jmp 2b\n" \
    - ".previous\n" \
    - _ASM_EXTABLE(1b,3b) \
    - : "=r"(err) \
    - : ltype (x), "m"(__m(addr)), "i"(errret), "0"(err))
    -
    -
    -#define __get_user_nocheck(x,ptr,size) \
    -({ \
    - long __gu_err; \
    - unsigned long __gu_val; \
    - __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\
    - (x) = (__typeof__(*(ptr)))__gu_val; \
    - __gu_err; \
    + asm volatile("1: mov"itype" %"rtype"1,%2\n" \
    + "2:\n" \
    + ".section .fixup,\"ax\"\n" \
    + "3: movl %3,%0\n" \
    + " jmp 2b\n" \
    + ".previous\n" \
    + _ASM_EXTABLE(1b, 3b) \
    + : "=r"(err) \
    + : ltype (x), "m" (__m(addr)), "i" (errret), "0" (err))
    +
    +
    +#define __get_user_nocheck(x, ptr, size) \
    +({ \
    + long __gu_err; \
    + unsigned long __gu_val; \
    + __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
    + (x) = (__typeof__(*(ptr)))__gu_val; \
    + __gu_err; \
    })

    extern long __get_user_bad(void);

    -#define __get_user_size(x,ptr,size,retval,errret) \
    +#define __get_user_size(x, ptr, size, retval, errret) \
    do { \
    retval = 0; \
    __chk_user_ptr(ptr); \
    switch (size) { \
    - case 1: __get_user_asm(x,ptr,retval,"b","b","=q",errret);break; \
    - case 2: __get_user_asm(x,ptr,retval,"w","w","=r",errret);break; \
    - case 4: __get_user_asm(x,ptr,retval,"l","","=r",errret);break; \
    - default: (x) = __get_user_bad(); \
    + case 1: \
    + __get_user_asm(x, ptr, retval, "b", "b", "=q", errret); \
    + break; \
    + case 2: \
    + __get_user_asm(x, ptr, retval, "w", "w", "=r", errret); \
    + break; \
    + case 4: \
    + __get_user_asm(x, ptr, retval, "l", "", "=r", errret); \
    + break; \
    + default: \
    + (x) = __get_user_bad(); \
    } \
    } while (0)

    #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
    - __asm__ __volatile__( \
    - "1: mov"itype" %2,%"rtype"1\n" \
    - "2:\n" \
    - ".section .fixup,\"ax\"\n" \
    - "3: movl %3,%0\n" \
    - " xor"itype" %"rtype"1,%"rtype"1\n" \
    - " jmp 2b\n" \
    - ".previous\n" \
    - _ASM_EXTABLE(1b,3b) \
    - : "=r"(err), ltype (x) \
    - : "m"(__m(addr)), "i"(errret), "0"(err))
    -
    -
    -unsigned long __must_check __copy_to_user_ll(void __user *to,
    - const void *from, unsigned long n);
    -unsigned long __must_check __copy_from_user_ll(void *to,
    - const void __user *from, unsigned long n);
    -unsigned long __must_check __copy_from_user_ll_nozero(void *to,
    - const void __user *from, unsigned long n);
    -unsigned long __must_check __copy_from_user_ll_nocache(void *to,
    - const void __user *from, unsigned long n);
    -unsigned long __must_check __copy_from_user_ll_nocache_nozero(void *to,
    - const void __user *from, unsigned long n);
    + asm volatile("1: mov"itype" %2,%"rtype"1\n" \
    + "2:\n" \
    + ".section .fixup,\"ax\"\n" \
    + "3: movl %3,%0\n" \
    + " xor"itype" %"rtype"1,%"rtype"1\n" \
    + " jmp 2b\n" \
    + ".previous\n" \
    + _ASM_EXTABLE(1b, 3b) \
    + : "=r" (err), ltype (x) \
    + : "m" (__m(addr)), "i" (errret), "0" (err))
    +
    +
    +unsigned long __must_check __copy_to_user_ll
    + (void __user *to, const void *from, unsigned long n);
    +unsigned long __must_check __copy_from_user_ll
    + (void *to, const void __user *from, unsigned long n);
    +unsigned long __must_check __copy_from_user_ll_nozero
    + (void *to, const void __user *from, unsigned long n);
    +unsigned long __must_check __copy_from_user_ll_nocache
    + (void *to, const void __user *from, unsigned long n);
    +unsigned long __must_check __copy_from_user_ll_nocache_nozero
    + (void *to, const void __user *from, unsigned long n);

    /**
    * __copy_to_user_inatomic: - Copy a block of data into user space, with less checking.
    @@ -416,13 +469,16 @@ __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)

    switch (n) {
    case 1:
    - __put_user_size(*(u8 *)from, (u8 __user *)to, 1, ret, 1);
    + __put_user_size(*(u8 *)from, (u8 __user *)to,
    + 1, ret, 1);
    return ret;
    case 2:
    - __put_user_size(*(u16 *)from, (u16 __user *)to, 2, ret, 2);
    + __put_user_size(*(u16 *)from, (u16 __user *)to,
    + 2, ret, 2);
    return ret;
    case 4:
    - __put_user_size(*(u32 *)from, (u32 __user *)to, 4, ret, 4);
    + __put_user_size(*(u32 *)from, (u32 __user *)to,
    + 4, ret, 4);
    return ret;
    }
    }
    @@ -545,19 +601,21 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
    }

    static __always_inline unsigned long
    -__copy_from_user_inatomic_nocache(void *to, const void __user *from, unsigned long n)
    +__copy_from_user_inatomic_nocache(void *to, const void __user *from,
    + unsigned long n)
    {
    return __copy_from_user_ll_nocache_nozero(to, from, n);
    }

    unsigned long __must_check copy_to_user(void __user *to,
    - const void *from, unsigned long n);
    + const void *from, unsigned long n);
    unsigned long __must_check copy_from_user(void *to,
    - const void __user *from, unsigned long n);
    + const void __user *from,
    + unsigned long n);
    long __must_check strncpy_from_user(char *dst, const char __user *src,
    - long count);
    + long count);
    long __must_check __strncpy_from_user(char *dst,
    - const char __user *src, long count);
    + const char __user *src, long count);

    /**
    * strlen_user: - Get the size of a string in user space.
    --
    1.5.4.rc2

    --
    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/

  15. [PATCH 075/148] include/asm-x86/msidef.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/msidef.h | 12 ++++++++----
    1 files changed, 8 insertions(+), 4 deletions(-)

    diff --git a/include/asm-x86/msidef.h b/include/asm-x86/msidef.h
    index 5b8acdd..296f29c 100644
    --- a/include/asm-x86/msidef.h
    +++ b/include/asm-x86/msidef.h
    @@ -11,7 +11,8 @@

    #define MSI_DATA_VECTOR_SHIFT 0
    #define MSI_DATA_VECTOR_MASK 0x000000ff
    -#define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & MSI_DATA_VECTOR_MASK)
    +#define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & \
    + MSI_DATA_VECTOR_MASK)

    #define MSI_DATA_DELIVERY_MODE_SHIFT 8
    #define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT)
    @@ -37,11 +38,14 @@
    #define MSI_ADDR_DEST_MODE_LOGICAL (1 << MSI_ADDR_DEST_MODE_SHIFT)

    #define MSI_ADDR_REDIRECTION_SHIFT 3
    -#define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) /* dedicated cpu */
    -#define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) /* lowest priority */
    +#define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT)
    + /* dedicated cpu */
    +#define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT)
    + /* lowest priority */

    #define MSI_ADDR_DEST_ID_SHIFT 12
    #define MSI_ADDR_DEST_ID_MASK 0x00ffff0
    -#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & MSI_ADDR_DEST_ID_MASK)
    +#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \
    + MSI_ADDR_DEST_ID_MASK)

    #endif /* ASM_MSIDEF_H */
    --
    1.5.4.rc2

    --
    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/

  16. [PATCH 060/148] include/asm-x86/kvm_x86_emulate.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/kvm_x86_emulate.h | 28 ++++++++++++++--------------
    1 files changed, 14 insertions(+), 14 deletions(-)

    diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h
    index 7db91b9..d6337f9 100644
    --- a/include/asm-x86/kvm_x86_emulate.h
    +++ b/include/asm-x86/kvm_x86_emulate.h
    @@ -68,10 +68,10 @@ struct x86_emulate_ops {
    * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
    * @bytes: [IN ] Number of bytes to read from memory.
    */
    - int (*read_emulated) (unsigned long addr,
    - void *val,
    - unsigned int bytes,
    - struct kvm_vcpu *vcpu);
    + int (*read_emulated)(unsigned long addr,
    + void *val,
    + unsigned int bytes,
    + struct kvm_vcpu *vcpu);

    /*
    * write_emulated: Read bytes from emulated/special memory area.
    @@ -80,10 +80,10 @@ struct x86_emulate_ops {
    * required).
    * @bytes: [IN ] Number of bytes to write to memory.
    */
    - int (*write_emulated) (unsigned long addr,
    - const void *val,
    - unsigned int bytes,
    - struct kvm_vcpu *vcpu);
    + int (*write_emulated)(unsigned long addr,
    + const void *val,
    + unsigned int bytes,
    + struct kvm_vcpu *vcpu);

    /*
    * cmpxchg_emulated: Emulate an atomic (LOCKed) CMPXCHG operation on an
    @@ -93,11 +93,11 @@ struct x86_emulate_ops {
    * @new: [IN ] Value to write to @addr.
    * @bytes: [IN ] Number of bytes to access using CMPXCHG.
    */
    - int (*cmpxchg_emulated) (unsigned long addr,
    - const void *old,
    - const void *new,
    - unsigned int bytes,
    - struct kvm_vcpu *vcpu);
    + int (*cmpxchg_emulated)(unsigned long addr,
    + const void *old,
    + const void *new,
    + unsigned int bytes,
    + struct kvm_vcpu *vcpu);

    };

    @@ -143,7 +143,7 @@ struct x86_emulate_ctxt {
    /* Register state before/after emulation. */
    struct kvm_vcpu *vcpu;

    - /* Linear faulting address (if emulating a page-faulting instruction). */
    + /* Linear faulting address (if emulating a page-faulting instruction) */
    unsigned long eflags;

    /* Emulated execution mode, represented by an X86EMUL_MODE value. */
    --
    1.5.4.rc2

    --
    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/

  17. [PATCH 131/148] include/asm-x86/topology.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/topology.h | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h
    index 5bc825b..46a8994 100644
    --- a/include/asm-x86/topology.h
    +++ b/include/asm-x86/topology.h
    @@ -72,7 +72,7 @@ static inline int cpu_to_node(int cpu)
    #ifdef CONFIG_DEBUG_PER_CPU_MAPS
    if (x86_cpu_to_node_map_early_ptr) {
    printk("KERN_NOTICE cpu_to_node(%d): usage too early!\n",
    - (int)cpu);
    + (int)cpu);
    dump_stack();
    return ((int *)x86_cpu_to_node_map_early_ptr)[cpu];
    }
    --
    1.5.4.rc2

    --
    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/

  18. [PATCH 136/148] include/asm-x86/unistd_32.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/unistd_32.h | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/include/asm-x86/unistd_32.h b/include/asm-x86/unistd_32.h
    index 984123a..8317d94 100644
    --- a/include/asm-x86/unistd_32.h
    +++ b/include/asm-x86/unistd_32.h
    @@ -81,7 +81,7 @@
    #define __NR_sigpending 73
    #define __NR_sethostname 74
    #define __NR_setrlimit 75
    -#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
    +#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
    #define __NR_getrusage 77
    #define __NR_gettimeofday 78
    #define __NR_settimeofday 79
    --
    1.5.4.rc2

    --
    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/

  19. [PATCH 128/148] include/asm-x86/thread_info_64.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/thread_info_64.h | 78 ++++++++++++++++++++------------------
    1 files changed, 41 insertions(+), 37 deletions(-)

    diff --git a/include/asm-x86/thread_info_64.h b/include/asm-x86/thread_info_64.h
    index 92ff23d..f23fefc 100644
    --- a/include/asm-x86/thread_info_64.h
    +++ b/include/asm-x86/thread_info_64.h
    @@ -29,9 +29,9 @@ struct thread_info {
    __u32 flags; /* low level flags */
    __u32 status; /* thread synchronous flags */
    __u32 cpu; /* current CPU */
    - int preempt_count; /* 0 => preemptable, <0 => BUG */
    -
    - mm_segment_t addr_limit;
    + int preempt_count; /* 0 => preemptable,
    + <0 => BUG */
    + mm_segment_t addr_limit;
    struct restart_block restart_block;
    #ifdef CONFIG_IA32_EMULATION
    void __user *sysenter_return;
    @@ -61,17 +61,17 @@ struct thread_info {
    #define init_stack (init_thread_union.stack)

    static inline struct thread_info *current_thread_info(void)
    -{
    +{
    struct thread_info *ti;
    ti = (void *)(read_pda(kernelstack) + PDA_STACKOFFSET - THREAD_SIZE);
    - return ti;
    + return ti;
    }

    /* do not use in interrupt context */
    static inline struct thread_info *stack_thread_info(void)
    {
    struct thread_info *ti;
    - __asm__("andq %%rsp,%0; ":"=r" (ti) : "0" (~(THREAD_SIZE - 1)));
    + asm("andq %%rsp,%0; " : "=r" (ti) : "0" (~(THREAD_SIZE - 1)));
    return ti;
    }

    @@ -82,8 +82,8 @@ static inline struct thread_info *stack_thread_info(void)
    #define THREAD_FLAGS GFP_KERNEL
    #endif

    -#define alloc_thread_info(tsk) \
    - ((struct thread_info *) __get_free_pages(THREAD_FLAGS, THREAD_ORDER))
    +#define alloc_thread_info(tsk) \
    + ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER))

    #else /* !__ASSEMBLY__ */

    @@ -96,7 +96,8 @@ static inline struct thread_info *stack_thread_info(void)

    /*
    * thread information flags
    - * - these are process state flags that various assembly files may need to access
    + * - these are process state flags that various assembly files
    + * may need to access
    * - pending work-to-be-done flags are in LSW
    * - other flags in MSW
    * Warning: layout of LSW is hardcoded in entry.S
    @@ -112,7 +113,7 @@ static inline struct thread_info *stack_thread_info(void)
    #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */
    #define TIF_HRTICK_RESCHED 11 /* reprogram hrtick timer */
    /* 16 free */
    -#define TIF_IA32 17 /* 32bit process */
    +#define TIF_IA32 17 /* 32bit process */
    #define TIF_FORK 18 /* ret_from_fork */
    #define TIF_ABI_PENDING 19
    #define TIF_MEMDIE 20
    @@ -124,39 +125,40 @@ static inline struct thread_info *stack_thread_info(void)
    #define TIF_DS_AREA_MSR 26 /* uses thread_struct.ds_area_msr */
    #define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */

    -#define _TIF_SYSCALL_TRACE (1< -#define _TIF_SIGPENDING (1< -#define _TIF_SINGLESTEP (1< -#define _TIF_NEED_RESCHED (1< -#define _TIF_IRET (1< -#define _TIF_SYSCALL_AUDIT (1< -#define _TIF_SECCOMP (1< -#define _TIF_RESTORE_SIGMASK (1< -#define _TIF_MCE_NOTIFY (1< -#define _TIF_HRTICK_RESCHED (1< -#define _TIF_IA32 (1< -#define _TIF_FORK (1< -#define _TIF_ABI_PENDING (1< -#define _TIF_DEBUG (1< -#define _TIF_IO_BITMAP (1< -#define _TIF_FREEZE (1< -#define _TIF_FORCED_TF (1< -#define _TIF_DEBUGCTLMSR (1< -#define _TIF_DS_AREA_MSR (1< -#define _TIF_BTS_TRACE_TS (1< +#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
    +#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
    +#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
    +#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
    +#define _TIF_IRET (1 << TIF_IRET)
    +#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
    +#define _TIF_SECCOMP (1 << TIF_SECCOMP)
    +#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
    +#define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY)
    +#define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED)
    +#define _TIF_IA32 (1 << TIF_IA32)
    +#define _TIF_FORK (1 << TIF_FORK)
    +#define _TIF_ABI_PENDING (1 << TIF_ABI_PENDING)
    +#define _TIF_DEBUG (1 << TIF_DEBUG)
    +#define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
    +#define _TIF_FREEZE (1 << TIF_FREEZE)
    +#define _TIF_FORCED_TF (1 << TIF_FORCED_TF)
    +#define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR)
    +#define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR)
    +#define _TIF_BTS_TRACE_TS (1 << TIF_BTS_TRACE_TS)

    /* work to do on interrupt/exception return */
    -#define _TIF_WORK_MASK \
    - (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGL ESTEP|_TIF_SECCOMP))
    +#define _TIF_WORK_MASK \
    + (0x0000FFFF & \
    + ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGL ESTEP|_TIF_SECCOMP))
    /* work to do on any return to user space */
    #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP)

    -#define _TIF_DO_NOTIFY_MASK \
    +#define _TIF_DO_NOTIFY_MASK \
    (_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY|_ TIF_HRTICK_RESCHED)

    /* flags to check in __switch_to() */
    -#define _TIF_WORK_CTXSW \
    - (_TIF_IO_BITMAP|_TIF_DEBUGCTLMSR|_TIF_DS_AREA_MSR| _TIF_BTS_TRACE_TS)
    +#define _TIF_WORK_CTXSW \
    + (_TIF_IO_BITMAP|_TIF_DEBUGCTLMSR|_TIF_DS_AREA_MSR| _TIF_BTS_TRACE_TS)
    #define _TIF_WORK_CTXSW_PREV _TIF_WORK_CTXSW
    #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW|_TIF_DEBUG)

    @@ -169,9 +171,11 @@ static inline struct thread_info *stack_thread_info(void)
    * ever touches our thread-synchronous status, so we don't
    * have to worry about atomic accesses.
    */
    -#define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */
    +#define TS_USEDFPU 0x0001 /* FPU was used by this task
    + this quantum (SMP) */
    #define TS_COMPAT 0x0002 /* 32bit syscall active */
    -#define TS_POLLING 0x0004 /* true if in idle loop and not sleeping */
    +#define TS_POLLING 0x0004 /* true if in idle loop
    + and not sleeping */

    #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)

    --
    1.5.4.rc2

    --
    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/

  20. [PATCH 074/148] include/asm-x86/mpspec.h: checkpatch cleanups - formatting only


    Signed-off-by: Joe Perches
    ---
    include/asm-x86/mpspec.h | 23 +++++++++++------------
    1 files changed, 11 insertions(+), 12 deletions(-)

    diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h
    index 99da0a5..eccbc58 100644
    --- a/include/asm-x86/mpspec.h
    +++ b/include/asm-x86/mpspec.h
    @@ -55,8 +55,7 @@ extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low);

    #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS)

    -struct physid_mask
    -{
    +struct physid_mask {
    unsigned long mask[PHYSID_ARRAY_SIZE];
    };

    @@ -65,34 +64,34 @@ typedef struct physid_mask physid_mask_t;
    #define physid_set(physid, map) set_bit(physid, (map).mask)
    #define physid_clear(physid, map) clear_bit(physid, (map).mask)
    #define physid_isset(physid, map) test_bit(physid, (map).mask)
    -#define physid_test_and_set(physid, map) \
    +#define physid_test_and_set(physid, map) \
    test_and_set_bit(physid, (map).mask)

    -#define physids_and(dst, src1, src2) \
    +#define physids_and(dst, src1, src2) \
    bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS)

    -#define physids_or(dst, src1, src2) \
    +#define physids_or(dst, src1, src2) \
    bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS)

    -#define physids_clear(map) \
    +#define physids_clear(map) \
    bitmap_zero((map).mask, MAX_APICS)

    -#define physids_complement(dst, src) \
    +#define physids_complement(dst, src) \
    bitmap_complement((dst).mask, (src).mask, MAX_APICS)

    -#define physids_empty(map) \
    +#define physids_empty(map) \
    bitmap_empty((map).mask, MAX_APICS)

    -#define physids_equal(map1, map2) \
    +#define physids_equal(map1, map2) \
    bitmap_equal((map1).mask, (map2).mask, MAX_APICS)

    -#define physids_weight(map) \
    +#define physids_weight(map) \
    bitmap_weight((map).mask, MAX_APICS)

    -#define physids_shift_right(d, s, n) \
    +#define physids_shift_right(d, s, n) \
    bitmap_shift_right((d).mask, (s).mask, n, MAX_APICS)

    -#define physids_shift_left(d, s, n) \
    +#define physids_shift_left(d, s, n) \
    bitmap_shift_left((d).mask, (s).mask, n, MAX_APICS)

    #define physids_coerce(map) ((map).mask[0])
    --
    1.5.4.rc2

    --
    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/

+ Reply to Thread
Page 3 of 10 FirstFirst 1 2 3 4 5 ... LastLast