From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754521AbcEQAsZ (ORCPT ); Mon, 16 May 2016 20:48:25 -0400 Received: from g2t4625.austin.hp.com ([15.73.212.76]:54190 "EHLO g2t4625.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752198AbcEQAsY (ORCPT ); Mon, 16 May 2016 20:48:24 -0400 From: Jason Low To: Peter Zijlstra , Ingo Molnar Cc: linux-kernel@vger.kernel.org, Andrew Morton , Richard Henderson , Linus Torvalds , Ivan Kokshaysky , Matt Turner , Tony Luck , Fenghua Yu , Martin Schwidefsky , Terry Rudd , Heiko Carstens , Thomas Gleixner , Arnd Bergmann , Christoph Lameter , Davidlohr Bueso , Waiman Long , Tim Chen , Peter Hurley , Jason Low , Jason Low Subject: [RFC][PATCH 7/7] locking,asm-generic: Remove generic rwsem add and rwsem update definitions Date: Mon, 16 May 2016 17:38:06 -0700 Message-Id: <1463445486-16078-8-git-send-email-jason.low2@hpe.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1463445486-16078-1-git-send-email-jason.low2@hpe.com> References: <1463445486-16078-1-git-send-email-jason.low2@hpe.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The rwsem count has been converted to an atomic variable and we now directly use atomic_long_add() and atomic_long_add_return() on the count, so we can remove the asm-generic implementation of rwsem_atomic_add() and rwsem_atomic_update(). Signed-off-by: Jason Low --- include/asm-generic/rwsem.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/include/asm-generic/rwsem.h b/include/asm-generic/rwsem.h index 3fc94a0..dd9db88 100644 --- a/include/asm-generic/rwsem.h +++ b/include/asm-generic/rwsem.h @@ -107,14 +107,6 @@ static inline void __up_write(struct rw_semaphore *sem) } /* - * implement atomic add functionality - */ -static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem) -{ - atomic_long_add(delta, (atomic_long_t *)&sem->count); -} - -/* * downgrade write lock to read lock */ static inline void __downgrade_write(struct rw_semaphore *sem) @@ -134,13 +126,5 @@ static inline void __downgrade_write(struct rw_semaphore *sem) rwsem_downgrade_wake(sem); } -/* - * implement exchange and add functionality - */ -static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem) -{ - return atomic_long_add_return(delta, (atomic_long_t *)&sem->count); -} - #endif /* __KERNEL__ */ #endif /* _ASM_GENERIC_RWSEM_H */ -- 2.1.4