Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753437AbcD0Pdb (ORCPT ); Wed, 27 Apr 2016 11:33:31 -0400 Received: from terminus.zytor.com ([198.137.202.10]:50958 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753009AbcD0Pd2 (ORCPT ); Wed, 27 Apr 2016 11:33:28 -0400 Date: Wed, 27 Apr 2016 08:33:13 -0700 From: tip-bot for Davidlohr Bueso Message-ID: Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, dbueso@suse.de, acme@redhat.com, mingo@kernel.org, dave@stgolabs.net Reply-To: dave@stgolabs.net, mingo@kernel.org, acme@redhat.com, dbueso@suse.de, linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com In-Reply-To: <1461208447-29328-1-git-send-email-dave@stgolabs.net> References: <1461208447-29328-1-git-send-email-dave@stgolabs.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf bench futex: Simplify wrapper for LOCK_PI Git-Commit-ID: 73b1794e252b0476cc6e46461c7612cbaa88be45 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 Content-Length: 2127 Lines: 56 Commit-ID: 73b1794e252b0476cc6e46461c7612cbaa88be45 Gitweb: http://git.kernel.org/tip/73b1794e252b0476cc6e46461c7612cbaa88be45 Author: Davidlohr Bueso AuthorDate: Wed, 20 Apr 2016 20:14:07 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 25 Apr 2016 20:24:26 -0300 perf bench futex: Simplify wrapper for LOCK_PI Given that the 'val' parameter is ignored for FUTEX_LOCK_PI, get rid of the bogus deadlock detection flag in the wrapper code and avoid the extra argument, making it resemble its unlock counterpart. And if nothing else, we already only pass 0 anyway. Signed-off-by: Davidlohr Bueso Cc: Davidlohr Bueso Link: http://lkml.kernel.org/r/1461208447-29328-1-git-send-email-dave@stgolabs.net Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/bench/futex-lock-pi.c | 2 +- tools/perf/bench/futex.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c index 6a18ce2..6952db6 100644 --- a/tools/perf/bench/futex-lock-pi.c +++ b/tools/perf/bench/futex-lock-pi.c @@ -83,7 +83,7 @@ static void *workerfn(void *arg) do { int ret; again: - ret = futex_lock_pi(w->futex, NULL, 0, futex_flag); + ret = futex_lock_pi(w->futex, NULL, futex_flag); if (ret) { /* handle lock acquisition */ if (!silent) diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h index d44de9f..b2e06d1 100644 --- a/tools/perf/bench/futex.h +++ b/tools/perf/bench/futex.h @@ -57,13 +57,11 @@ futex_wake(u_int32_t *uaddr, int nr_wake, int opflags) /** * futex_lock_pi() - block on uaddr as a PI mutex - * @detect: whether (1) or not (0) to perform deadlock detection */ static inline int -futex_lock_pi(u_int32_t *uaddr, struct timespec *timeout, int detect, - int opflags) +futex_lock_pi(u_int32_t *uaddr, struct timespec *timeout, int opflags) { - return futex(uaddr, FUTEX_LOCK_PI, detect, timeout, NULL, 0, opflags); + return futex(uaddr, FUTEX_LOCK_PI, 0, timeout, NULL, 0, opflags); } /**