Skip to content

Commit b640985

Browse files
committed
perf tools: Remove unused macros from util.h
TYPEOF(), for instance, was only used by MSB() that wasn't used at all, besides typeof() is used in many places, should be the preferred way. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-golox8oa2w1oq28snki14z6s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 68289cb commit b640985

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

‎tools/perf/util/util.h‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
#ifndef GIT_COMPAT_UTIL_H
22
#define GIT_COMPAT_UTIL_H
33

4-
#ifdef __GNUC__
5-
#define TYPEOF(x) (__typeof__(x))
6-
#else
7-
#define TYPEOF(x)
8-
#endif
9-
10-
#define MSB(x, bits) ((x) & TYPEOF(x)(~0ULL << (sizeof(x) * 8 - (bits))))
11-
#define HAS_MULTI_BITS(i) ((i) & ((i) - 1)) /* checks if an integer has more than 1 bit set */
12-
13-
/* Approximation of the length of the decimal representation of this type. */
14-
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
15-
164
#define _ALL_SOURCE 1
175
#define _BSD_SOURCE 1
186
/* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */

0 commit comments

Comments
 (0)