* + rcutorture-remove-redundant-assignment-to-cur_ops-in.patch added to -mm tree
@ 2007-02-07 23:18 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-07 23:18 UTC (permalink / raw)
To: mm-commits; +Cc: josh, paulmck
The patch titled
rcutorture: Remove redundant assignment to cur_ops in for loop
has been added to the -mm tree. Its filename is
rcutorture-remove-redundant-assignment-to-cur_ops-in.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: rcutorture: Remove redundant assignment to cur_ops in for loop
From: Josh Triplett <josh@kernel.org>
The for loop in rcutorture_init uses the condition
cur_ops = torture_ops[i], cur_ops
but then makes the same assignment to cur_ops inside the loop. Remove the
redundant assignment inside the loop, and remove now-unnecessary braces.
Signed-off-by: Josh Triplett <josh@kernel.org>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/rcutorture.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff -puN kernel/rcutorture.c~rcutorture-remove-redundant-assignment-to-cur_ops-in kernel/rcutorture.c
--- a/kernel/rcutorture.c~rcutorture-remove-redundant-assignment-to-cur_ops-in
+++ a/kernel/rcutorture.c
@@ -942,12 +942,9 @@ rcu_torture_init(void)
/* Process args and tell the world that the torturer is on the job. */
- for (i = 0; cur_ops = torture_ops[i], cur_ops; i++) {
- cur_ops = torture_ops[i];
- if (strcmp(torture_type, cur_ops->name) == 0) {
+ for (i = 0; cur_ops = torture_ops[i], cur_ops; i++)
+ if (strcmp(torture_type, cur_ops->name) == 0)
break;
- }
- }
if (cur_ops == NULL) {
printk(KERN_ALERT "rcutorture: invalid torture type: \"%s\"\n",
torture_type);
_
Patches currently in -mm which might be from josh@kernel.org are
usb-in-init_endpoint_class-use-ptr_err-to-obtain-an-errno-value-not-is_err.patch
rcutorture-style-cleanup-avoid-=-null-in-boolean-tests.patch
rcutorture-remove-redundant-assignment-to-cur_ops-in.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-07 23:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-07 23:18 + rcutorture-remove-redundant-assignment-to-cur_ops-in.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.