[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-a037d269221c0ae15f47046757afcbd1a7177bbf@git.kernel.org>
Date: Tue, 6 Aug 2019 06:07:15 -0700
From: tip-bot for Mukesh Ojha <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, mingo@...nel.org, peterz@...radead.org,
linux-kernel@...r.kernel.org, mojha@...eaurora.org, hpa@...or.com
Subject: [tip:locking/core] locking/mutex: Use mutex flags macro instead of
hard code
Commit-ID: a037d269221c0ae15f47046757afcbd1a7177bbf
Gitweb: https://git.kernel.org/tip/a037d269221c0ae15f47046757afcbd1a7177bbf
Author: Mukesh Ojha <mojha@...eaurora.org>
AuthorDate: Wed, 31 Jul 2019 20:35:04 +0530
Committer: Peter Zijlstra <peterz@...radead.org>
CommitDate: Tue, 6 Aug 2019 12:49:16 +0200
locking/mutex: Use mutex flags macro instead of hard code
Use the mutex flag macro instead of hard code value inside
__mutex_owner().
Signed-off-by: Mukesh Ojha <mojha@...eaurora.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: mingo@...hat.com
Cc: will@...nel.org
Link: https://lkml.kernel.org/r/1564585504-3543-2-git-send-email-mojha@codeaurora.org
---
kernel/locking/mutex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index ac4929f1e085..b4bcb0236d7a 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -85,7 +85,7 @@ EXPORT_SYMBOL(__mutex_init);
*/
static inline struct task_struct *__mutex_owner(struct mutex *lock)
{
- return (struct task_struct *)(atomic_long_read(&lock->owner) & ~0x07);
+ return (struct task_struct *)(atomic_long_read(&lock->owner) & ~MUTEX_FLAGS);
}
static inline struct task_struct *__owner_task(unsigned long owner)
Powered by blists - more mailing lists