lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 Apr 2017 04:06:00 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tglx@...utronix.de, acme@...hat.com, jolsa@...nel.org,
        dsahern@...il.com, mingo@...nel.org, adrian.hunter@...el.com,
        wangnan0@...wei.com, linux-kernel@...r.kernel.org, hpa@...or.com,
        namhyung@...nel.org
Subject: [tip:perf/core] perf tools: Remove unused macros from util.h

Commit-ID:  b640985fe40c7446fa5db467e747fbac5c081c86
Gitweb:     http://git.kernel.org/tip/b640985fe40c7446fa5db467e747fbac5c081c86
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Mon, 17 Apr 2017 12:13:25 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
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.

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-golox8oa2w1oq28snki14z6s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.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 3eccd6f..2abd4f7 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 */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ