[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1625547043-28103-1-git-send-email-yehanxu1@gmail.com>
Date: Tue, 6 Jul 2021 12:50:43 +0800
From: Yehan Xu <yehanxu1@...il.com>
To: peterz@...radead.org, mingo@...hat.com, will@...nel.org
Cc: longman@...hat.com, boqun.feng@...il.com,
linux-kernel@...r.kernel.org, xuyehan <xuyehan@...omi.com>
Subject: [PATCH] locking/rwsem: Remove an unused parameter of rwsem_wake()
From: xuyehan <xuyehan@...omi.com>
The 2nd parameter 'count' is not used in this function.
The places where the function is called are also modified.
Signed-off-by: xuyehan <xuyehan@...omi.com>
---
kernel/locking/rwsem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c
index 16bfbb1..8a595b6 100644
--- a/kernel/locking/rwsem.c
+++ b/kernel/locking/rwsem.c
@@ -1165,7 +1165,7 @@ rwsem_down_write_slowpath(struct rw_semaphore *sem, int state)
* handle waking up a waiter on the semaphore
* - up_read/up_write has decremented the active part of count if we come here
*/
-static struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem, long count)
+static struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
{
unsigned long flags;
DEFINE_WAKE_Q(wake_q);
@@ -1297,7 +1297,7 @@ static inline void __up_read(struct rw_semaphore *sem)
if (unlikely((tmp & (RWSEM_LOCK_MASK|RWSEM_FLAG_WAITERS)) ==
RWSEM_FLAG_WAITERS)) {
clear_nonspinnable(sem);
- rwsem_wake(sem, tmp);
+ rwsem_wake(sem);
}
}
@@ -1319,7 +1319,7 @@ static inline void __up_write(struct rw_semaphore *sem)
rwsem_clear_owner(sem);
tmp = atomic_long_fetch_add_release(-RWSEM_WRITER_LOCKED, &sem->count);
if (unlikely(tmp & RWSEM_FLAG_WAITERS))
- rwsem_wake(sem, tmp);
+ rwsem_wake(sem);
}
/*
--
2.7.4
Powered by blists - more mailing lists