Skip to contentSkip to conversation

selftests-mm-fix-warning-expression-which-evaluates-to-zero-in-mlock2-testsc.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 19, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests/mm: fix "warning: expression which evaluates to zero..." in mlock2-tests.c
has been removed from the -mm tree. Its filename was
selftests-mm-fix-warning-expression-which-evaluates-to-zero-in-mlock2-testsc.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: John Hubbard <[email protected]>
Subject: selftests/mm: fix "warning: expression which evaluates to zero..." in mlock2-tests.c
Date: Tue, 6 Jun 2023 00:16:29 -0700

The stop variable is a char*, and the code was assigning a char value to it. This was generating a warning when compiling with clang.

However, as both David and Peter pointed out, stop is not even used after the problematic assignment to a char type. So just delete that line entirely.

---

 tools/testing/selftests/mm/mlock2-tests.c |    1 -
 1 file changed, 1 deletion(-)
tools/testing/selftests/mm/mlock2-tests.c renamed from tools/testing/selftests/mm/mlock2-tests.c~selftests-mm-fix-warning-expression-which-evaluates-to-zero-in-mlock2-testsc +0 -1
@@ -50,7 +50,6 @@ static int get_vm_area(unsigned long add
 			printf("cannot parse /proc/self/maps\n");
 			goto out;
 		}
-		stop = '\0';
 
 		sscanf(line, "%lx", &start);
 		sscanf(end_addr, "%lx", &end);

_

Patches currently in -mm which might be from [email protected] are