lkml.org 
[lkml]   [2022]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V5 1/2] selftests: vm: bring common functions to a new file
From
> diff --git a/tools/testing/selftests/vm/vm_util.h b/tools/testing/selftests/vm/vm_util.h
> new file mode 100644
> index 0000000000000..e9f5a0f2be196
> --- /dev/null
> +++ b/tools/testing/selftests/vm/vm_util.h
> @@ -0,0 +1,10 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#include <stdint.h>
> +#include <fcntl.h>
> +#include "../kselftest.h"

Are that latter two really required in this header? IMHO they should be
moved to the respective files that need them.

If you return "bool" below, you might want to include <stdbool.h> here
as well.

> +
> +uint64_t pagemap_get_entry(int fd, char *start);
> +bool pagemap_is_softdirty(int fd, char *start);
> +void clear_softdirty(void);
> +uint64_t read_pmd_pagesize(void);
> +uint64_t check_huge(void *addr);

Apart from that, LGTM.

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2022-03-21 17:11    [W:0.189 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site