diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-12-15 14:04:11 -0500 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-12-17 09:09:41 -0500 |
| commit | 0389cd1f5fda34c14941c37a39547d16af5d56e2 (patch) | |
| tree | 247ed2257e6656420fe7aa6a2f0063de8b6c91a4 /tools/perf/util/util.h | |
| parent | 2dc0b9721956f4314364f68a99d8bef490870438 (diff) | |
tools: Move code originally from linux/log2.h to tools/include/linux/
From tools/perf/util/include/linux, so that it becomes accessible to
other tools/.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-uqohgzilp3ebd3cbybnf3luc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/util.h')
| -rw-r--r-- | tools/perf/util/util.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 008b361b1758..25b22bbea066 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h | |||
| @@ -269,17 +269,6 @@ void event_attr_init(struct perf_event_attr *attr); | |||
| 269 | #define _STR(x) #x | 269 | #define _STR(x) #x |
| 270 | #define STR(x) _STR(x) | 270 | #define STR(x) _STR(x) |
| 271 | 271 | ||
| 272 | /* | ||
| 273 | * Determine whether some value is a power of two, where zero is | ||
| 274 | * *not* considered a power of two. | ||
| 275 | */ | ||
| 276 | |||
| 277 | static inline __attribute__((const)) | ||
| 278 | bool is_power_of_2(unsigned long n) | ||
| 279 | { | ||
| 280 | return (n != 0 && ((n & (n - 1)) == 0)); | ||
| 281 | } | ||
| 282 | |||
| 283 | static inline unsigned next_pow2(unsigned x) | 272 | static inline unsigned next_pow2(unsigned x) |
| 284 | { | 273 | { |
| 285 | if (!x) | 274 | if (!x) |
