From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751856AbdFHJgm (ORCPT ); Thu, 8 Jun 2017 05:36:42 -0400 Received: from terminus.zytor.com ([65.50.211.136]:34509 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751802AbdFHJgk (ORCPT ); Thu, 8 Jun 2017 05:36:40 -0400 Date: Thu, 8 Jun 2017 02:31:59 -0700 From: tip-bot for Dmitry Vyukov Message-ID: Cc: aryabinin@virtuozzo.com, akpm@linux-foundation.org, mingo@kernel.org, mark.rutland@arm.com, tglx@linutronix.de, peterz@infradead.org, hpa@zytor.com, torvalds@linux-foundation.org, dvyukov@google.com, linux-kernel@vger.kernel.org Reply-To: linux-kernel@vger.kernel.org, dvyukov@google.com, hpa@zytor.com, peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org, akpm@linux-foundation.org, mingo@kernel.org, mark.rutland@arm.com, aryabinin@virtuozzo.com In-Reply-To: <20170526172900.91058-1-dvyukov@google.com> References: <20170526172900.91058-1-dvyukov@google.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/x86: Remove the unused atomic_inc_short() methd Git-Commit-ID: 31b35f6b4d5285a311e10753f4eb17304326b211 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: 31b35f6b4d5285a311e10753f4eb17304326b211 Gitweb: http://git.kernel.org/tip/31b35f6b4d5285a311e10753f4eb17304326b211 Author: Dmitry Vyukov AuthorDate: Fri, 26 May 2017 19:29:00 +0200 Committer: Ingo Molnar CommitDate: Thu, 8 Jun 2017 10:33:50 +0200 locking/x86: Remove the unused atomic_inc_short() methd It is completely unused and implemented only on x86. Remove it. Suggested-by: Mark Rutland Signed-off-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Andrey Ryabinin Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170526172900.91058-1-dvyukov@google.com Signed-off-by: Ingo Molnar --- arch/tile/lib/atomic_asm_32.S | 3 +-- arch/x86/include/asm/atomic.h | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/arch/tile/lib/atomic_asm_32.S b/arch/tile/lib/atomic_asm_32.S index 1a70e6c..94709ab 100644 --- a/arch/tile/lib/atomic_asm_32.S +++ b/arch/tile/lib/atomic_asm_32.S @@ -24,8 +24,7 @@ * has an opportunity to return -EFAULT to the user if needed. * The 64-bit routines just return a "long long" with the value, * since they are only used from kernel space and don't expect to fault. - * Support for 16-bit ops is included in the framework but we don't provide - * any (x86_64 has an atomic_inc_short(), so we might want to some day). + * Support for 16-bit ops is included in the framework but we don't provide any. * * Note that the caller is advised to issue a suitable L1 or L2 * prefetch on the address being manipulated to avoid extra stalls. diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h index caa5798..33380b8 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h @@ -246,19 +246,6 @@ static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u) return c; } -/** - * atomic_inc_short - increment of a short integer - * @v: pointer to type int - * - * Atomically adds 1 to @v - * Returns the new value of @u - */ -static __always_inline short int atomic_inc_short(short int *v) -{ - asm(LOCK_PREFIX "addw $1, %0" : "+m" (*v)); - return *v; -} - #ifdef CONFIG_X86_32 # include #else