]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
locking: Fix typos in comments
authorIngo Molnar <mingo@kernel.org>
Mon, 22 Mar 2021 01:35:05 +0000 (02:35 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 22 Mar 2021 01:45:52 +0000 (02:45 +0100)
Fix ~16 single-word typos in locking code comments.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/arm/include/asm/spinlock.h
include/linux/lockdep.h
include/linux/rwsem.h
kernel/locking/lockdep.c
kernel/locking/lockdep_proc.c
kernel/locking/mcs_spinlock.h
kernel/locking/mutex.c
kernel/locking/osq_lock.c
kernel/locking/rtmutex.c
kernel/locking/rwsem.c
kernel/locking/spinlock.c

index 8f009e788ad401766b5b9456b6ac9f1ec75e84fe..f610a773f2be527dde14415a61fab4c7250d9447 100644 (file)
@@ -22,7 +22,7 @@
  * assembler to insert a extra (16-bit) IT instruction, depending on the
  * presence or absence of neighbouring conditional instructions.
  *
- * To avoid this unpredictableness, an approprite IT is inserted explicitly:
+ * To avoid this unpredictability, an appropriate IT is inserted explicitly:
  * the assembler won't change IT instructions which are explicitly present
  * in the input.
  */
index 17805aac0e85401ce9ea338d48f4d60f466d6ef8..09ac2e8348d2b40f2a98d9b169e74149a9f76272 100644 (file)
@@ -155,7 +155,7 @@ extern void lockdep_set_selftest_task(struct task_struct *task);
 extern void lockdep_init_task(struct task_struct *task);
 
 /*
- * Split the recrursion counter in two to readily detect 'off' vs recursion.
+ * Split the recursion counter in two to readily detect 'off' vs recursion.
  */
 #define LOCKDEP_RECURSION_BITS 16
 #define LOCKDEP_OFF            (1U << LOCKDEP_RECURSION_BITS)
index 4c715be4871719dcaa252c9e8e5ab1445703e391..a66038d88878f32df1e4ba2a64036dee648815a7 100644 (file)
@@ -110,7 +110,7 @@ do {                                                                \
 
 /*
  * This is the same regardless of which rwsem implementation that is being used.
- * It is just a heuristic meant to be called by somebody alreadying holding the
+ * It is just a heuristic meant to be called by somebody already holding the
  * rwsem to see if somebody from an incompatible type is wanting access to the
  * lock.
  */
index c0b8926a67f0669c1cd4166637bd177dffa5e5d2..0e97287891db21dc03be22546bc89d1973c1ab02 100644 (file)
@@ -1747,7 +1747,7 @@ static enum bfs_result __bfs(struct lock_list *source_entry,
 
                /*
                 * Step 4: if not match, expand the path by adding the
-                *         forward or backwards dependencis in the search
+                *         forward or backwards dependencies in the search
                 *
                 */
                first = true;
@@ -1916,7 +1916,7 @@ print_circular_bug_header(struct lock_list *entry, unsigned int depth,
  * -> B is -(ER)-> or -(EN)->, then we don't need to add A -> B into the
  * dependency graph, as any strong path ..-> A -> B ->.. we can get with
  * having dependency A -> B, we could already get a equivalent path ..-> A ->
- * .. -> B -> .. with A -> .. -> B. Therefore A -> B is reduntant.
+ * .. -> B -> .. with A -> .. -> B. Therefore A -> B is redundant.
  *
  * We need to make sure both the start and the end of A -> .. -> B is not
  * weaker than A -> B. For the start part, please see the comment in
index 02ef87f50df29c2a53dbf7b27320e1001fe09e33..8069783144966486d782bbf67b36740000c26248 100644 (file)
@@ -348,7 +348,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
                        debug_locks);
 
        /*
-        * Zappped classes and lockdep data buffers reuse statistics.
+        * Zapped classes and lockdep data buffers reuse statistics.
         */
        seq_puts(m, "\n");
        seq_printf(m, " zapped classes:                %11lu\n",
index 5e10153b4d3c92b149a72eaae92e6bafacfef161..85251d8771d91904446d085cf6992da4b33c3e0c 100644 (file)
@@ -7,7 +7,7 @@
  * The MCS lock (proposed by Mellor-Crummey and Scott) is a simple spin-lock
  * with the desirable properties of being fair, and with each cpu trying
  * to acquire the lock spinning on a local variable.
- * It avoids expensive cache bouncings that common test-and-set spin-lock
+ * It avoids expensive cache bounces that common test-and-set spin-lock
  * implementations incur.
  */
 #ifndef __LINUX_MCS_SPINLOCK_H
index 622ebdfcd083b2712ce04b550cd0c4e02e2ddbfa..cb6b112ce1550d9bcf17b53eb770279f1c040a5d 100644 (file)
@@ -92,7 +92,7 @@ static inline unsigned long __owner_flags(unsigned long owner)
 }
 
 /*
- * Trylock variant that retuns the owning task on failure.
+ * Trylock variant that returns the owning task on failure.
  */
 static inline struct task_struct *__mutex_trylock_or_owner(struct mutex *lock)
 {
@@ -207,7 +207,7 @@ __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
 
 /*
  * Give up ownership to a specific task, when @task = NULL, this is equivalent
- * to a regular unlock. Sets PICKUP on a handoff, clears HANDOF, preserves
+ * to a regular unlock. Sets PICKUP on a handoff, clears HANDOFF, preserves
  * WAITERS. Provides RELEASE semantics like a regular unlock, the
  * __mutex_trylock() provides a matching ACQUIRE semantics for the handoff.
  */
index 1de006ed3aa8c794465961b9a5cef3c36301f6f9..d5610ad52b92b55b98b6a35f8700c5df940e8f81 100644 (file)
@@ -135,7 +135,7 @@ bool osq_lock(struct optimistic_spin_queue *lock)
         */
 
        /*
-        * Wait to acquire the lock or cancelation. Note that need_resched()
+        * Wait to acquire the lock or cancellation. Note that need_resched()
         * will come with an IPI, which will wake smp_cond_load_relaxed() if it
         * is implemented with a monitor-wait. vcpu_is_preempted() relies on
         * polling, be careful.
@@ -164,7 +164,7 @@ bool osq_lock(struct optimistic_spin_queue *lock)
 
                /*
                 * We can only fail the cmpxchg() racing against an unlock(),
-                * in which case we should observe @node->locked becomming
+                * in which case we should observe @node->locked becoming
                 * true.
                 */
                if (smp_load_acquire(&node->locked))
index 29f09d0b82242d143aec9d21af9d076a3c4b718b..db31bce114f838acd2033e6cfdda5be9cacdc4e6 100644 (file)
@@ -706,7 +706,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
        } else if (prerequeue_top_waiter == waiter) {
                /*
                 * The waiter was the top waiter on the lock, but is
-                * no longer the top prority waiter. Replace waiter in
+                * no longer the top priority waiter. Replace waiter in
                 * the owner tasks pi waiters tree with the new top
                 * (highest priority) waiter and adjust the priority
                 * of the owner.
@@ -1194,7 +1194,7 @@ static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
                return;
 
        /*
-        * Yell lowdly and stop the task right here.
+        * Yell loudly and stop the task right here.
         */
        rt_mutex_print_deadlock(w);
        while (1) {
index fe9cc65cd5221e12cc14af115c91372d309c9b70..809b0016d3445f039ec1e369bf028b2fefdfbb48 100644 (file)
@@ -819,7 +819,7 @@ static bool rwsem_optimistic_spin(struct rw_semaphore *sem)
                 *    we try to get it. The new owner may be a spinnable
                 *    writer.
                 *
-                * To take advantage of two scenarios listed agove, the RT
+                * To take advantage of two scenarios listed above, the RT
                 * task is made to retry one more time to see if it can
                 * acquire the lock or continue spinning on the new owning
                 * writer. Of course, if the time lag is long enough or the
index 0ff08380f5318ee6722589f6fc6329b8a0de5f74..c8d7ad9fb9b2a948f6ab20fb18c1dbeffe0b9500 100644 (file)
@@ -58,10 +58,10 @@ EXPORT_PER_CPU_SYMBOL(__mmiowb_state);
 /*
  * We build the __lock_function inlines here. They are too large for
  * inlining all over the place, but here is only one user per function
- * which embedds them into the calling _lock_function below.
+ * which embeds them into the calling _lock_function below.
  *
  * This could be a long-held lock. We both prepare to spin for a long
- * time (making _this_ CPU preemptable if possible), and we also signal
+ * time (making _this_ CPU preemptible if possible), and we also signal
  * towards that other CPU that it should break the lock ASAP.
  */
 #define BUILD_LOCK_OPS(op, locktype)                                   \