From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031645AbdDTLIT (ORCPT ); Thu, 20 Apr 2017 07:08:19 -0400 Received: from terminus.zytor.com ([65.50.211.136]:54251 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942871AbdDTLIR (ORCPT ); Thu, 20 Apr 2017 07:08:17 -0400 Date: Thu, 20 Apr 2017 04:06:00 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: tglx@linutronix.de, acme@redhat.com, jolsa@kernel.org, dsahern@gmail.com, mingo@kernel.org, adrian.hunter@intel.com, wangnan0@huawei.com, linux-kernel@vger.kernel.org, hpa@zytor.com, namhyung@kernel.org Reply-To: acme@redhat.com, dsahern@gmail.com, jolsa@kernel.org, tglx@linutronix.de, namhyung@kernel.org, wangnan0@huawei.com, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org, adrian.hunter@intel.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Remove unused macros from util.h Git-Commit-ID: b640985fe40c7446fa5db467e747fbac5c081c86 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b640985fe40c7446fa5db467e747fbac5c081c86 Gitweb: http://git.kernel.org/tip/b640985fe40c7446fa5db467e747fbac5c081c86 Author: Arnaldo Carvalho de Melo AuthorDate: Mon, 17 Apr 2017 12:13:25 -0300 Committer: Arnaldo Carvalho de Melo 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 Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-golox8oa2w1oq28snki14z6s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 */