diff options
Diffstat (limited to 'kernel/rcutorture.c')
| -rw-r--r-- | kernel/rcutorture.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 17cba7a6b224..55ba82a85a66 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c | |||
| @@ -502,10 +502,6 @@ static struct rcu_torture_ops sched_ops = { | |||
| 502 | .name = "sched" | 502 | .name = "sched" |
| 503 | }; | 503 | }; |
| 504 | 504 | ||
| 505 | static struct rcu_torture_ops *torture_ops[] = | ||
| 506 | { &rcu_ops, &rcu_sync_ops, &rcu_bh_ops, &rcu_bh_sync_ops, &srcu_ops, | ||
| 507 | &sched_ops, NULL }; | ||
| 508 | |||
| 509 | /* | 505 | /* |
| 510 | * RCU torture writer kthread. Repeatedly substitutes a new structure | 506 | * RCU torture writer kthread. Repeatedly substitutes a new structure |
| 511 | * for that pointed to by rcu_torture_current, freeing the old structure | 507 | * for that pointed to by rcu_torture_current, freeing the old structure |
| @@ -872,16 +868,17 @@ rcu_torture_init(void) | |||
| 872 | int i; | 868 | int i; |
| 873 | int cpu; | 869 | int cpu; |
| 874 | int firsterr = 0; | 870 | int firsterr = 0; |
| 871 | static struct rcu_torture_ops *torture_ops[] = | ||
| 872 | { &rcu_ops, &rcu_sync_ops, &rcu_bh_ops, &rcu_bh_sync_ops, | ||
| 873 | &srcu_ops, &sched_ops, }; | ||
| 875 | 874 | ||
| 876 | /* Process args and tell the world that the torturer is on the job. */ | 875 | /* Process args and tell the world that the torturer is on the job. */ |
| 877 | 876 | for (i = 0; i < ARRAY_SIZE(torture_ops); i++) { | |
| 878 | for (i = 0; cur_ops = torture_ops[i], cur_ops; i++) { | ||
| 879 | cur_ops = torture_ops[i]; | 877 | cur_ops = torture_ops[i]; |
| 880 | if (strcmp(torture_type, cur_ops->name) == 0) { | 878 | if (strcmp(torture_type, cur_ops->name) == 0) |
| 881 | break; | 879 | break; |
| 882 | } | ||
| 883 | } | 880 | } |
| 884 | if (cur_ops == NULL) { | 881 | if (i == ARRAY_SIZE(torture_ops)) { |
| 885 | printk(KERN_ALERT "rcutorture: invalid torture type: \"%s\"\n", | 882 | printk(KERN_ALERT "rcutorture: invalid torture type: \"%s\"\n", |
| 886 | torture_type); | 883 | torture_type); |
| 887 | return (-EINVAL); | 884 | return (-EINVAL); |
