diff mbox series

selftests/mm: import strings.h for ffsl

Message ID 20240329174236.2278217-1-edliaw@google.com
State Superseded
Headers show
Series selftests/mm: import strings.h for ffsl | expand

Commit Message

Edward Liaw March 29, 2024, 5:42 p.m. UTC
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")
Signed-off-by: Edward Liaw <edliaw@google.com>
---
 tools/testing/selftests/mm/vm_util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Muhammad Usama Anjum March 29, 2024, 7:33 p.m. UTC | #1
On 3/29/24 10:42 PM, Edward Liaw wrote:
> 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
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

> Signed-off-by: Edward Liaw <edliaw@google.com>
> ---
>  tools/testing/selftests/mm/vm_util.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h
> index c02990bbd56f..9007c420d52c 100644
> --- a/tools/testing/selftests/mm/vm_util.h
> +++ b/tools/testing/selftests/mm/vm_util.h
> @@ -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))
Muhammad Usama Anjum April 1, 2024, 9:50 a.m. UTC | #2
On 3/30/24 1:33 AM, Edward Liaw wrote:
> On Fri, Mar 29, 2024 at 12:32 PM Muhammad Usama Anjum
> <usama.anjum@collabora.com> wrote:
>>
>> On 3/29/24 10:42 PM, Edward Liaw wrote:
>>> 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")
LGTM

>
diff mbox series

Patch

diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h
index c02990bbd56f..9007c420d52c 100644
--- a/tools/testing/selftests/mm/vm_util.h
+++ b/tools/testing/selftests/mm/vm_util.h
@@ -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))