Skip to contentSkip to conversation

fix-application-of-sizeof-to-pointer.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 1, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: tools/testing/selftests/vm/split_huge_page_test.c: fix application of sizeof to pointer
has been removed from the -mm tree. Its filename was
fix-application-of-sizeof-to-pointer.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: David Yang <[email protected]>
Subject: tools/testing/selftests/vm/split_huge_page_test.c: fix application of sizeof to pointer

The coccinelle check report:
"./tools/testing/selftests/vm/split_huge_page_test.c:344:36-42:
ERROR: application of sizeof to pointer"
Using the "strlen" to fix it.

---

 tools/testing/selftests/vm/split_huge_page_test.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vm/split_huge_page_test.c renamed from tools/testing/selftests/vm/split_huge_page_test.c~fix-application-of-sizeof-to-pointer +1 -1
@@ -341,7 +341,7 @@ void split_file_backed_thp(void)
 	}
 
 	/* write something to the file, so a file-backed THP can be allocated */
-	num_written = write(fd, tmpfs_loc, sizeof(tmpfs_loc));
+	num_written = write(fd, tmpfs_loc, strlen(tmpfs_loc) + 1);
 	close(fd);
 
 	if (num_written < 1) {

_

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