Skip to contentSkip to conversation

selftests/mm: import strings.h for ffsl

PATCH Superseded Edward Liaw 2 participants 4 messages Mar 29, 2024 – Apr 1, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/mm: import strings.h for ffsl

Got a compilation error for ffsl after 91b80cc5b39f ("selftests: mm: fix map_hugetlb failure on 64K page size systems") imported vm_util.h.

Fixes af605d26a8f2 ("selftests/mm: merge util.h into vm_util.h")
---
 tools/testing/selftests/mm/vm_util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/mm/vm_util.h +1 -1
index c02990bbd56f..9007c420d52c 100644
@@ -3,7 +3,7 @@
 #include <stdbool.h>
 #include <sys/mman.h>
 #include <err.h>
-#include <string.h> /* ffsl() */
+#include <strings.h> /* ffsl() */
 #include <unistd.h> /* _SC_PAGESIZE */
 
 #define BIT_ULL(nr)                   (1ULL << (nr))
Signature · 1 line
2.44.0.478.gd926399ef9-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Edward Liaw

Got a compilation error for ffsl after 91b80cc5b39f ("selftests: mm: fix map_hugetlb failure on 64K page size systems") imported vm_util.h.

Fixes af605d26a8f2 ("selftests/mm: merge util.h into vm_util.h")

Why do you think this Fixes tag is needed? This refers to a patch which is just moving code. It doesn't seem to have any thing related to strings.h.

Other than that, LGTM

Quoted 18 lines
---
 tools/testing/selftests/mm/vm_util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/mm/vm_util.h +1 -1
index c02990bbd56f..9007c420d52c 100644
@@ -3,7 +3,7 @@
 #include <stdbool.h>
 #include <sys/mman.h>
 #include <err.h>
-#include <string.h> /* ffsl() */
+#include <strings.h> /* ffsl() */
 #include <unistd.h> /* _SC_PAGESIZE */
 
 #define BIT_ULL(nr)                   (1ULL << (nr))
Signature · 2 lines
BR,
Muhammad Usama Anjum
#2 lore raw
Quoted 8 lines · Muhammad Usama Anjum
Quoted 4 lines · Edward Liaw

Got a compilation error for ffsl after 91b80cc5b39f ("selftests: mm: fix map_hugetlb failure on 64K page size systems") imported vm_util.h.

Fixes af605d26a8f2 ("selftests/mm: merge util.h into vm_util.h")

Why do you think this Fixes tag is needed? This refers to a patch which is just moving code. It doesn't seem to have any thing related to strings.h.

Oops, I guess it should be:

Fixes 6f6a841fb77d ("selftest/vm: add helpers to detect PAGE_SIZE and

PAGE_SHIFT")

#3 lore raw
Quoted 7 lines · Edward Liaw
Quoted 5 lines · Muhammad Usama Anjum
Quoted 3 lines · Edward Liaw

Got a compilation error for ffsl after 91b80cc5b39f ("selftests: mm: fix map_hugetlb failure on 64K page size systems") imported vm_util.h.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Fixes af605d26a8f2 ("selftests/mm: merge util.h into vm_util.h")

Why do you think this Fixes tag is needed? This refers to a patch which is just moving code. It doesn't seem to have any thing related to strings.h.

Oops, I guess it should be:

Fixes 6f6a841fb77d ("selftest/vm: add helpers to detect PAGE_SIZE and

PAGE_SHIFT")

LGTM

Quoted 1 line
Signature · 2 lines
BR,
Muhammad Usama Anjum