[PATCH] locking: mutex: Fix brackets in comments

Manuel Ebner posted 1 patch 2 weeks, 2 days ago
kernel/locking/mutex.c   | 2 +-
kernel/locking/rtmutex.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
[PATCH] locking: mutex: Fix brackets in comments
Posted by Manuel Ebner 2 weeks, 2 days ago
Remove needless '(' from sentence and add missing ')' to example code
Add whitespace to "CPU 1	CPU2"
               -> "CPU 1	CPU 2"

Signed-off-by: Manuel Ebner <manuelebnerli@mailbox.org>
---
 kernel/locking/mutex.c   | 2 +-
 kernel/locking/rtmutex.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 942a939ce..5636ad9f4 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -11,7 +11,7 @@
  * Many thanks to Arjan van de Ven, Thomas Gleixner, Steven Rostedt and
  * David Howells for suggestions and improvements.
  *
- *  - Adaptive spinning for mutexes by Peter Zijlstra. (Ported to mainline
+ *  - Adaptive spinning for mutexes by Peter Zijlstra. Ported to mainline
  *    from the -rt tree, where it was originally implemented for rtmutexes
  *    by Steven Rostedt, based on work by Gregory Haskins, Peter Morreale
  *    and Sven Dietrich.
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 5a9534c71..3947bdc2b 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -143,7 +143,7 @@ fixup_rt_mutex_waiters(struct rt_mutex_base *lock, bool acquire_lock)
 	 * lock->owner still has the waiters bit set, otherwise the
 	 * following can happen:
 	 *
-	 * CPU 0	CPU 1		CPU2
+	 * CPU 0	CPU 1		CPU 2
 	 * l->owner=T1
 	 *		rt_mutex_lock(l)
 	 *		lock(l->lock)
@@ -172,14 +172,14 @@ fixup_rt_mutex_waiters(struct rt_mutex_base *lock, bool acquire_lock)
 	 *				 unlock(l->lock)
 	 *		lock(l->lock)
 	 *		fixup_rt_mutex_waiters()
-	 *		  if (wait_list_empty(l) {
+	 *		  if (wait_list_empty(l)) {
 	 *		    l->owner = owner
 	 *		    owner = l->owner & ~HAS_WAITERS;
 	 *		      ==> l->owner = T1
 	 *		  }
 	 *				lock(l->lock)
 	 * rt_mutex_unlock(l)		fixup_rt_mutex_waiters()
-	 *				  if (wait_list_empty(l) {
+	 *				  if (wait_list_empty(l)) {
 	 *				    owner = l->owner & ~HAS_WAITERS;
 	 * cmpxchg(l->owner, T1, NULL)
 	 *  ===> Success (l->owner = NULL)
-- 
2.54.0