Skip to contentSkip to conversation

perf tools: Remove unused macros from util.h

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Apr 20, 2017 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  b640985fe40c7446fa5db467e747fbac5c081c86
Gitweb:     http://git.kernel.org/tip/b640985fe40c7446fa5db467e747fbac5c081c86
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 17 Apr 2017 12:13:25 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 19 Apr 2017 13:01:45 -0300

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.

---
 tools/perf/util/util.h | 12 ------------
 1 file changed, 12 deletions(-)
tools/perf/util/util.h +0 -12
index 3eccd6f..2abd4f7 100644
@@ -1,18 +1,6 @@
 #ifndef GIT_COMPAT_UTIL_H
 #define GIT_COMPAT_UTIL_H
 
-#ifdef __GNUC__
-#define TYPEOF(x) (__typeof__(x))
-#else
-#define TYPEOF(x)
-#endif
-
-#define MSB(x, bits) ((x) & TYPEOF(x)(~0ULL << (sizeof(x) * 8 - (bits))))
-#define HAS_MULTI_BITS(i)  ((i) & ((i) - 1))  /* checks if an integer has more than 1 bit set */
-
-/* Approximation of the length of the decimal representation of this type. */
-#define decimal_length(x)	((int)(sizeof(x) * 2.56 + 0.5) + 1)
-
 #define _ALL_SOURCE 1
 #define _BSD_SOURCE 1
 /* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */