From: Andrew Morton argh, zombiecode. Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton --- kernel/rcutorture.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff -puN kernel/rcutorture.c~srcu-2-add-srcu-operations-to-rcutorture-fix kernel/rcutorture.c --- a/kernel/rcutorture.c~srcu-2-add-srcu-operations-to-rcutorture-fix +++ a/kernel/rcutorture.c @@ -304,7 +304,7 @@ static void srcu_torture_cleanup(void) static int srcu_torture_read_lock(void) { - return (srcu_read_lock(&srcu_ctl)); + return srcu_read_lock(&srcu_ctl); } static void srcu_torture_read_unlock(int idx) @@ -344,14 +344,15 @@ int srcu_torture_stats(char *page) int cpu; int idx = srcu_ctl.completed & 0x1; - cnt += sprintf(&page[cnt], "%s%s per-CPU(idx=%d):", torture_type, TORTURE_FLAG, idx); - for_each_cpu(cpu) { + cnt += sprintf(&page[cnt], "%s%s per-CPU(idx=%d):", + torture_type, TORTURE_FLAG, idx); + for_each_possible_cpu(cpu) { cnt += sprintf(&page[cnt], " %d(%d,%d)", cpu, per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[!idx], per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[idx]); } cnt += sprintf(&page[cnt], "\n"); - return (cnt); + return cnt; } static struct rcu_torture_ops srcu_ops = { @@ -692,14 +693,13 @@ rcu_torture_init(void) for (i = 0; cur_ops = torture_ops[i], cur_ops != NULL; i++) { cur_ops = torture_ops[i]; - if (strcmp(torture_type, cur_ops->name) == 0) { + if (strcmp(torture_type, cur_ops->name) == 0) break; - } } if (cur_ops == NULL) { printk(KERN_ALERT "rcutorture: invalid torture type: \"%s\"\n", torture_type); - return (-EINVAL); + return -EINVAL; } if (cur_ops->init != NULL) cur_ops->init(); /* no "goto unwind" prior to this point!!! */ _