2021-08-21 09:21:49

by Riccardo Mancini

[permalink] [raw]
Subject: [RFC PATCH v1 05/37] perf util/mmap: add missing bitops.h header

MMAP_CPU_MASK_BYTES uses the BITS_TO_LONGS macro, which is defined in
linux/bitops.h.
However, this header is not included directly, but gets imported
indirectly in files using the macro.
This patch adds the missing include.

Signed-off-by: Riccardo Mancini <[email protected]>
---
tools/perf/util/mmap.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
index b4923e587fd7749c..8e259b9610f83c96 100644
--- a/tools/perf/util/mmap.h
+++ b/tools/perf/util/mmap.h
@@ -6,6 +6,7 @@
#include <linux/refcount.h>
#include <linux/types.h>
#include <linux/ring_buffer.h>
+#include <linux/bitops.h>
#include <stdbool.h>
#include <pthread.h> // for cpu_set_t
#ifdef HAVE_AIO_SUPPORT
--
2.31.1


2021-08-31 19:23:42

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [RFC PATCH v1 05/37] perf util/mmap: add missing bitops.h header

Em Sat, Aug 21, 2021 at 11:19:11AM +0200, Riccardo Mancini escreveu:
> MMAP_CPU_MASK_BYTES uses the BITS_TO_LONGS macro, which is defined in
> linux/bitops.h.
> However, this header is not included directly, but gets imported
> indirectly in files using the macro.
> This patch adds the missing include.

Thanks, applied.

- Arnaldo


> Signed-off-by: Riccardo Mancini <[email protected]>
> ---
> tools/perf/util/mmap.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
> index b4923e587fd7749c..8e259b9610f83c96 100644
> --- a/tools/perf/util/mmap.h
> +++ b/tools/perf/util/mmap.h
> @@ -6,6 +6,7 @@
> #include <linux/refcount.h>
> #include <linux/types.h>
> #include <linux/ring_buffer.h>
> +#include <linux/bitops.h>
> #include <stdbool.h>
> #include <pthread.h> // for cpu_set_t
> #ifdef HAVE_AIO_SUPPORT
> --
> 2.31.1

--

- Arnaldo