+ rcutorture-remove-redundant-assignment-to-cur_ops-in.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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@xxxxxxxxxx>
Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 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@xxxxxxxxxx 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

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux