diff options
| author | Borislav Petkov <bp@suse.de> | 2014-04-25 15:31:02 -0400 |
|---|---|---|
| committer | Jiri Olsa <jolsa@kernel.org> | 2014-05-01 15:22:39 -0400 |
| commit | d944c4eebcf4c0d5e5d9728fec110cbf0047ad7f (patch) | |
| tree | 94240760600b3b1de6b6c95fe76b68a6990b2669 /tools/perf/util/include/linux | |
| parent | 5ac3e4b6d1d8fb911bb9c497126c51b02033a412 (diff) | |
tools: Consolidate types.h
Combine all definitions into a common tools/include/linux/types.h and
kill the wild growth elsewhere. Move DECLARE_BITMAP to its proper
bitmap.h header.
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Link: http://lkml.kernel.org/n/tip-azczs7qcv6h9xek9od10hiv2@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/util/include/linux')
| -rw-r--r-- | tools/perf/util/include/linux/bitmap.h | 3 | ||||
| -rw-r--r-- | tools/perf/util/include/linux/list.h | 1 | ||||
| -rw-r--r-- | tools/perf/util/include/linux/types.h | 29 |
3 files changed, 4 insertions, 29 deletions
diff --git a/tools/perf/util/include/linux/bitmap.h b/tools/perf/util/include/linux/bitmap.h index bb162e40c76c..01ffd12dc791 100644 --- a/tools/perf/util/include/linux/bitmap.h +++ b/tools/perf/util/include/linux/bitmap.h | |||
| @@ -4,6 +4,9 @@ | |||
| 4 | #include <string.h> | 4 | #include <string.h> |
| 5 | #include <linux/bitops.h> | 5 | #include <linux/bitops.h> |
| 6 | 6 | ||
| 7 | #define DECLARE_BITMAP(name,bits) \ | ||
| 8 | unsigned long name[BITS_TO_LONGS(bits)] | ||
| 9 | |||
| 7 | int __bitmap_weight(const unsigned long *bitmap, int bits); | 10 | int __bitmap_weight(const unsigned long *bitmap, int bits); |
| 8 | void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, | 11 | void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, |
| 9 | const unsigned long *bitmap2, int bits); | 12 | const unsigned long *bitmap2, int bits); |
diff --git a/tools/perf/util/include/linux/list.h b/tools/perf/util/include/linux/list.h index bfe0a2afd0d2..76ddbc726343 100644 --- a/tools/perf/util/include/linux/list.h +++ b/tools/perf/util/include/linux/list.h | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
| 2 | #include <linux/types.h> | ||
| 2 | 3 | ||
| 3 | #include "../../../../include/linux/list.h" | 4 | #include "../../../../include/linux/list.h" |
| 4 | 5 | ||
diff --git a/tools/perf/util/include/linux/types.h b/tools/perf/util/include/linux/types.h deleted file mode 100644 index eb464786c084..000000000000 --- a/tools/perf/util/include/linux/types.h +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | #ifndef _PERF_LINUX_TYPES_H_ | ||
| 2 | #define _PERF_LINUX_TYPES_H_ | ||
| 3 | |||
| 4 | #include <asm/types.h> | ||
| 5 | |||
| 6 | #ifndef __bitwise | ||
| 7 | #define __bitwise | ||
| 8 | #endif | ||
| 9 | |||
| 10 | #ifndef __le32 | ||
| 11 | typedef __u32 __bitwise __le32; | ||
| 12 | #endif | ||
| 13 | |||
| 14 | #define DECLARE_BITMAP(name,bits) \ | ||
| 15 | unsigned long name[BITS_TO_LONGS(bits)] | ||
| 16 | |||
| 17 | struct list_head { | ||
| 18 | struct list_head *next, *prev; | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct hlist_head { | ||
| 22 | struct hlist_node *first; | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct hlist_node { | ||
| 26 | struct hlist_node *next, **pprev; | ||
| 27 | }; | ||
| 28 | |||
| 29 | #endif | ||
