From: tip-bot for Mukesh Ojha <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org,
linux-kernel@vger.kernel.org, mojha@codeaurora.org,
hpa@zytor.com
Subject: [tip:locking/core] locking/mutex: Use mutex flags macro instead of hard code
Date: Tue, 6 Aug 2019 06:07:15 -0700 [thread overview]
Message-ID: <tip-a037d269221c0ae15f47046757afcbd1a7177bbf@git.kernel.org> (raw)
In-Reply-To: <1564585504-3543-2-git-send-email-mojha@codeaurora.org>
Commit-ID: a037d269221c0ae15f47046757afcbd1a7177bbf
Gitweb: https://git.kernel.org/tip/a037d269221c0ae15f47046757afcbd1a7177bbf
Author: Mukesh Ojha <mojha@codeaurora.org>
AuthorDate: Wed, 31 Jul 2019 20:35:04 +0530
Committer: Peter Zijlstra <peterz@infradead.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@codeaurora.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: mingo@redhat.com
Cc: will@kernel.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)
next prev parent reply other threads:[~2019-08-06 13:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 15:05 [PATCH 1/2 v3] locking/mutex: Make __mutex_owner static to mutex.c Mukesh Ojha
2019-07-31 15:05 ` [PATCH 2/2 v3] locking/mutex: Use mutex flags macro instead of hard code Mukesh Ojha
2019-08-06 13:07 ` tip-bot for Mukesh Ojha [this message]
2019-08-06 13:06 ` [tip:locking/core] locking/mutex: Make __mutex_owner static to mutex.c tip-bot for Mukesh Ojha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-a037d269221c0ae15f47046757afcbd1a7177bbf@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mojha@codeaurora.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.