+ lib-test_vmallocc-test_func-eliminate-local-ret.patch added to -mm tree

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

 



The patch titled
     Subject: lib/test_vmalloc.c:test_func(): eliminate local `ret'
has been added to the -mm tree.  Its filename is
     lib-test_vmallocc-test_func-eliminate-local-ret.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/lib-test_vmallocc-test_func-eliminate-local-ret.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/lib-test_vmallocc-test_func-eliminate-local-ret.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: lib/test_vmalloc.c:test_func(): eliminate local `ret'

Local 'ret' is unneeded and was poorly named: the variable `ret' generally
means the "the value which this function will return".

Cc: Roman Gushchin <guro@xxxxxx>
Cc: Uladzislau Rezki <urezki@xxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Thomas Garnier <thgarnie@xxxxxxxxxx>
Cc: Oleksiy Avramchenko <oleksiy.avramchenko@xxxxxxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Joel Fernandes <joelaf@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/test_vmalloc.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- a/lib/test_vmalloc.c~lib-test_vmallocc-test_func-eliminate-local-ret
+++ a/lib/test_vmalloc.c
@@ -384,12 +384,11 @@ static int test_func(void *private)
 {
 	struct test_driver *t = private;
 	int random_array[ARRAY_SIZE(test_case_array)];
-	int index, i, j, ret;
+	int index, i, j;
 	ktime_t kt;
 	u64 delta;
 
-	ret = set_cpus_allowed_ptr(current, cpumask_of(t->cpu));
-	if (ret < 0)
+	if (set_cpus_allowed_ptr(current, cpumask_of(t->cpu)) < 0)
 		pr_err("Failed to set affinity to %d CPU\n", t->cpu);
 
 	for (i = 0; i < ARRAY_SIZE(test_case_array); i++)
@@ -415,8 +414,7 @@ static int test_func(void *private)
 
 		kt = ktime_get();
 		for (j = 0; j < test_repeat_count; j++) {
-			ret = test_case_array[index].test_func();
-			if (!ret)
+			if (!test_case_array[index].test_func())
 				per_cpu_test_data[t->cpu][index].test_passed++;
 			else
 				per_cpu_test_data[t->cpu][index].test_failed++;
_

Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are

ocfs2-clear-zero-in-unaligned-direct-io-checkpatch-fixes.patch
mm.patch
slab-fix-an-infinite-loop-in-leaks_show-fix.patch
userfaultfd-sysctl-add-vmunprivileged_userfaultfd-fix.patch
mm-compaction-fix-an-undefined-behaviour-fix.patch
mm-enable-error-injection-at-add_to_page_cache-fix.patch
mm-memory_hotplug-provide-a-more-generic-restrictions-for-memory-hotplug-fix.patch
mm-add-probe_user_read-fix.patch
mm-maintain-randomization-of-page-free-lists-checkpatch-fixes.patch
lib-list_sort-simplify-and-remove-max_list_length_bits-fix.patch
lib-test_vmallocc-test_func-eliminate-local-ret.patch
fs-binfmt_elfc-remove-unneeded-initialization-of-mm-start_stack.patch
cpumask-fix-double-string-traverse-in-cpumask_parse-fix.patch
convert-struct-pid-count-to-refcount_t-fix.patch
gcov-clang-support-checkpatch-fixes.patch
ipc-do-cyclic-id-allocation-for-the-ipc-object-fix.patch
linux-next-rejects.patch
scripts-atomic-check-atomicssh-dont-assume-that-scripts-are-executable.patch
mm-rename-ambiguously-named-memorystat-counters-and-functions-fix.patch
kernel-forkc-export-kernel_thread-to-modules.patch
slab-leaks3-default-y.patch




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

  Powered by Linux