Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1626483
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 09/28] perf tools: Remove unused macros from util.h |
| Date | 2017-04-19 18:30 +0200 |
| Message-ID | <ty0Es-5Fr-67@gated-at.bofh.it> (permalink) |
| References | <ty0uK-5Cb-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnaldo Carvalho de Melo <acme@redhat.com> 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> --- tools/perf/util/util.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 3eccd6f21d17..2abd4f783ffd 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -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 */ -- 2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/28] perf/core fixes and cleanups Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-19 18:30 +0200
[PATCH 12/28] perf tools: Replace STR() calls with __stringify() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-19 18:30 +0200
[PATCH 10/28] perf tools: Including missing inttypes.h header Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-19 18:30 +0200
[PATCH 23/28] perf tools: No need to include bitops.h in util.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-19 18:30 +0200
[PATCH 09/28] perf tools: Remove unused macros from util.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-19 18:30 +0200
[PATCH 22/28] perf tools: Move path related functions to util/path.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-19 18:30 +0200
[PATCH 11/28] perf tools: Remove PRI[xu] macros from perf.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-19 18:30 +0200
Re: [GIT PULL 00/28] perf/core fixes and cleanups Ingo Molnar <mingo@kernel.org> - 2017-04-20 10:20 +0200
Re: [GIT PULL 00/28] perf/core fixes and cleanups Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-20 13:30 +0200
Re: [GIT PULL 00/28] perf/core fixes and cleanups Ingo Molnar <mingo@kernel.org> - 2017-04-20 13:40 +0200
Re: [GIT PULL 00/28] perf/core fixes and cleanups Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-20 19:20 +0200
Re: [GIT PULL 00/28] perf/core fixes and cleanups Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-20 20:40 +0200
Re: [GIT PULL 00/28] perf/core fixes and cleanups Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-20 21:00 +0200
csiph-web