+ maple_tree-reorganize-testing-to-restore-module-testing-v3.patch added to mm-hotfixes-unstable branch

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

 



The patch titled
     Subject: maple_tree-reorganize-testing-to-restore-module-testing-v3
has been added to the -mm mm-hotfixes-unstable branch.  Its filename is
     maple_tree-reorganize-testing-to-restore-module-testing-v3.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/maple_tree-reorganize-testing-to-restore-module-testing-v3.patch

This patch will later appear in the mm-hotfixes-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

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 via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Liam Howlett <liam.howlett@xxxxxxxxxx>
Subject: maple_tree-reorganize-testing-to-restore-module-testing-v3
Date: Mon, 7 Nov 2022 20:38:32 +0000

fix compile warnings on 32bit build in check_find()

Link: https://lkml.kernel.org/r/20221107203816.1260327-1-Liam.Howlett@xxxxxxxxxx
Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/test_maple_tree.c            |   21 ++++++++++++++-------
 tools/testing/radix-tree/maple.c |    1 -
 2 files changed, 14 insertions(+), 8 deletions(-)

--- a/lib/test_maple_tree.c~maple_tree-reorganize-testing-to-restore-module-testing-v3
+++ a/lib/test_maple_tree.c
@@ -359,6 +359,7 @@ static noinline void check_find(struct m
 	unsigned long val = 0;
 	unsigned long count;
 	unsigned long max;
+	unsigned long top;
 	unsigned long last = 0, index = 0;
 	void *entry, *entry2;
 
@@ -367,10 +368,17 @@ static noinline void check_find(struct m
 	/* Insert 0. */
 	MT_BUG_ON(mt, mtree_insert_index(mt, val++, GFP_KERNEL));
 
-	if (MAPLE_32BIT)
+#if defined(CONFIG_64BIT)
+	top = 4398046511104UL;
+#else
+	top = ULONG_MAX;
+#endif
+
+	if (MAPLE_32BIT) {
 		count = 15;
-	else
+	} else {
 		count = 20;
+	}
 
 	for (int i = 0; i <= count; i++) {
 		if (val != 64)
@@ -450,9 +458,8 @@ static noinline void check_find(struct m
 	index = 0;
 	MT_BUG_ON(mt, mtree_insert_index(mt, ULONG_MAX, GFP_KERNEL));
 	mt_for_each(mt, entry, index, ULONG_MAX) {
-		if ((val == 4398046511104) || (val == ULONG_MAX))
-			MT_BUG_ON(mt, entry !=
-					xa_mk_value(ULONG_MAX & LONG_MAX));
+		if (val == top)
+			MT_BUG_ON(mt, entry != xa_mk_value(LONG_MAX));
 		else
 			MT_BUG_ON(mt, xa_mk_value(val) != entry);
 
@@ -493,8 +500,8 @@ static noinline void check_find(struct m
 	mas_for_each(&mas, entry, ULONG_MAX) {
 		if (val == 64)
 			MT_BUG_ON(mt, entry != XA_ZERO_ENTRY);
-		else if ((val == 4398046511104) || (val == ULONG_MAX))
-			MT_BUG_ON(mt, entry != xa_mk_value(ULONG_MAX & LONG_MAX));
+		else if (val == top)
+			MT_BUG_ON(mt, entry != xa_mk_value(LONG_MAX));
 		else
 			MT_BUG_ON(mt, xa_mk_value(val) != entry);
 
--- a/tools/testing/radix-tree/maple.c~maple_tree-reorganize-testing-to-restore-module-testing-v3
+++ a/tools/testing/radix-tree/maple.c
@@ -14,7 +14,6 @@
 #include <stdlib.h>
 #include <time.h>
 
-
 #define module_init(x)
 #define module_exit(x)
 #define MODULE_AUTHOR(x)
_

Patches currently in -mm which might be from liam.howlett@xxxxxxxxxx are

maple_tree-remove-pointer-to-pointer-use-in-mas_alloc_nodes.patch
maple_tree-mas_anode_descend-clang-analyzer-clean-up.patch
maple_tree-reorganize-testing-to-restore-module-testing.patch
maple_tree-reorganize-testing-to-restore-module-testing-v3.patch
maple_tree-fix-depth-tracking-in-maple_state.patch
maple_tree-dont-set-a-new-maximum-on-the-node-when-not-reusing-nodes.patch
maple_tree-fix-mas_find_rev-comment.patch
maple_tree-update-copyright-dates-for-test-code.patch
maple_tree-mte_set_full-and-mte_clear_full-clang-analyzer-clean-up.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