Skip to contentSkip to conversation

Fixups for together/ directory

PATCH Applied SeongJae Park 2 participants 10 messages Oct 10, 2016 – Oct 11, 2016

lore
Share & tools
lore
#0 lore raw

cover Fixups for together/ directory

This patchset fixes few trivial problems under together/ directory that found by Korean translation work.

SeongJae Park (8):
together: Add missing NBSPs for line numbers
together: Fix a wrong code line quotation
together: Fix wrong function name quotations
together: Add a missing comma
together: Append () suffix to function name quotation
together: Fix a wrong field citation
together: Fix a contextual typo
together: Improve struct field quotation readability

 together/applyrcu.tex | 14 +++++++-------
 together/refcnt.tex   | 10 +++++-----
 2 files changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
2.10.0
#1 lore raw

PATCH 1/8 together: Add missing NBSPs for line numbers

This commit adds few missed NBSP(Non-Breaking Space)s for line number quotations.

---
 together/applyrcu.tex | 6 +++---
 together/refcnt.tex   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
together/applyrcu.tex +3 -3
index 15039f645acc..659928877c00 100644
@@ -208,17 +208,17 @@ Lines~10-13 show \co{inc_count()}, which is unchanged from
 Figure~\ref{fig:count:Per-Thread Statistical Counters}.
 
 Lines~15-29 show \co{read_count()}, which has changed significantly.
-Lines~21 and 27 substitute \co{rcu_read_lock()} and
+Lines~21 and~27 substitute \co{rcu_read_lock()} and
 \co{rcu_read_unlock()} for acquisition and release of \co{final_mutex}.
 Line~22 uses \co{rcu_dereference()} to snapshot the
 current \co{countarray} structure into local variable \co{cap}.
 Proper use of RCU will guarantee that this \co{countarray} structure
 will remain with us through at least the end of the current RCU
 read-side critical section at line~27.
-Line 23 initializes \co{sum} to \co{cap->total}, which is the
+Line~23 initializes \co{sum} to \co{cap->total}, which is the
 sum of the counts of threads that have previously exited.
 Lines~24-26 add up the per-thread counters corresponding to currently
-running threads, and, finally, line 28 returns the sum.
+running threads, and, finally, line~28 returns the sum.
 
 The initial value for \co{countarrayp} is
 provided by \co{count_init()} on lines~31-39.
together/refcnt.tex +1 -1
index 778ad8e9da24..587a067f7501 100644
@@ -504,7 +504,7 @@ Line~6 invokes \co{rcu_read_lock()}, which
 enters an RCU read-side critical section.
 The callback function from any subsequent \co{call_rcu()} primitive
 will be deferred until a matching \co{rcu_read_unlock()} is reached
-(line~10 or 14 in this example).
+(line~10 or~14 in this example).
 Line~7 looks up the file structure corresponding to the file
 descriptor specified by the \co{fd} argument, as will be
 described later.
Signature · 1 line
2.10.0
#2 lore raw

PATCH 2/8 together: Fix a wrong code line quotation

In reply to SeongJae Park
---
 together/refcnt.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
together/refcnt.tex +1 -1
index 587a067f7501..a7e6c7bd0332 100644
@@ -306,7 +306,7 @@ process does no cross-module optimizations has the same effect.
 
 The \co{kref_put()} function on lines~16-28 atomically decrements the
 counter, and if the result is zero, line~24 invokes the specified
-\co{release()} function and line~24 returns, informing the caller
+\co{release()} function and line~25 returns, informing the caller
 that \co{release()} was invoked.
 Otherwise, \co{kref_put()} returns zero, informing the caller that
 \co{release()} was not called.
Signature · 1 line
2.10.0
#3 lore raw

PATCH 3/8 together: Fix wrong function name quotations

In reply to SeongJae Park

Few sentences calls kref_sub() function as kref_put(). This commit fixes the wrong citations.

---
 together/refcnt.tex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
together/refcnt.tex +2 -2
index a7e6c7bd0332..22d0a8d1d08e 100644
@@ -304,11 +304,11 @@ optimizations on all platforms, but the fact that the \co{kref}
 primitives are in a separate module and that the Linux kernel build
 process does no cross-module optimizations has the same effect.
 
-The \co{kref_put()} function on lines~16-28 atomically decrements the
+The \co{kref_sub()} function on lines~16-28 atomically decrements the
 counter, and if the result is zero, line~24 invokes the specified
 \co{release()} function and line~25 returns, informing the caller
 that \co{release()} was invoked.
-Otherwise, \co{kref_put()} returns zero, informing the caller that
+Otherwise, \co{kref_sub()} returns zero, informing the caller that
 \co{release()} was not called.
 
 \QuickQuiz{}
Signature · 1 line
2.10.0
#4 lore raw

PATCH 4/8 together: Add a missing comma

In reply to SeongJae Park
---
 together/refcnt.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
together/refcnt.tex +1 -1
index 22d0a8d1d08e..cf23ba729d01 100644
@@ -129,7 +129,7 @@ reference count need be checked for zero only very rarely.
 Simple counting protected by locking (\makebox{``-''}) is described in
 Section~\ref{sec:together:Simple Counting},
 atomic counting with no memory barriers (``A'') is described in
-Section~\ref{sec:together:Atomic Counting}
+Section~\ref{sec:together:Atomic Counting},
 atomic counting with acquisition memory barrier (``AM'') is described in
 Section~\ref{sec:together:Atomic Counting With Release Memory Barrier},
 and
Signature · 1 line
2.10.0
#5 lore raw

PATCH 5/8 together: Append `()` suffix to function name quotation

In reply to SeongJae Park
---
 together/applyrcu.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
together/applyrcu.tex +1 -1
index 659928877c00..86471633a64a 100644
@@ -268,7 +268,7 @@ Line~65 then retains a pointer to the current (soon to be old)
 \co{countarray} structure, and line~66 uses \co{rcu_assign_pointer()}
 to install the new version of the \co{countarray} structure.
 Line~68 waits for a grace period to elapse, so that any threads that
-might be concurrently executing in \co{read_count}, and thus might
+might be concurrently executing in \co{read_count()}, and thus might
 have references to the old \co{countarray} structure, will be allowed
 to exit their RCU read-side critical sections, thus dropping any such
 references.
Signature · 1 line
2.10.0
#6 lore raw

PATCH 6/8 together: Fix a wrong field citation

In reply to SeongJae Park

A sentence is pointing out ->a[] field while it should point out ->fa field by its context. This commit fixes the wrong field citation.

---
 together/applyrcu.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
together/applyrcu.tex +1 -1
index 86471633a64a..60d489c3b7bb 100644
@@ -465,7 +465,7 @@ length~\cite{Arcangeli03}.
 \item	CPU~0 loads the value of \co{->fa->length}, obtaining the value 16.
 \item	CPU~1 shrinks the array to be of length 8, and assigns a pointer
 	to a new \co{foo_a} structure containing an 8-character block
-	of memory into \co{->a[]}.
+	of memory into \co{->fa}.
 \item	CPU~0 picks up the new pointer from \co{->a[]}, and stores a
 	new value into element 12.
 	But because CPU~0 is still referencing the old \co{foo_a}
Signature · 1 line
2.10.0
#7 lore raw

PATCH 7/8 together: Fix a contextual typo

In reply to SeongJae Park
---
 together/applyrcu.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
together/applyrcu.tex +1 -1
index 60d489c3b7bb..02d36e6ba5f3 100644
@@ -606,7 +606,7 @@ can be freed.
 	\item	Use \co{rcu_assign_pointer()} to point \co{->mp}
 		back to the old embedded \co{->meas} field.
 	\item	After another grace period elapses, free up the
-		new \co{measurement} field.
+		new \co{measurement} structure.
 	\end{enumerate}
 
 	This approach uses a heavier weight update procedure to eliminate
Signature · 1 line
2.10.0
#8 lore raw

PATCH 8/8 together: Improve struct field quotation readability

In reply to SeongJae Park

A sentence is not using \co{}, neither -> for quotation of a field in a struct while other sentences uses both \co{} and -> for such case. This commit uses -> and \co{} for the quotation for better readability.

---
 together/applyrcu.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
together/applyrcu.tex +1 -1
index 02d36e6ba5f3..633488664779 100644
@@ -262,7 +262,7 @@ Lines~56-60 allocate a new \co{countarray} structure,
 line~61 acquires \co{final_mutex} and line~67 releases it.
 Line~62 copies the contents of the current \co{countarray} into
 the newly allocated version, line~63 adds the exiting thread's \co{counter}
-to new structure's total, and line~64 \co{NULL}s the exiting thread's
+to new structure's \co{->total}, and line~64 \co{NULL}s the exiting thread's
 \co{counterp[]} array element.
 Line~65 then retains a pointer to the current (soon to be old)
 \co{countarray} structure, and line~66 uses \co{rcu_assign_pointer()}
Signature · 1 line
2.10.0
#9 lore raw
In reply to SeongJae Park
Quoted 13 lines · SeongJae Park

This patchset fixes few trivial problems under together/ directory that found by Korean translation work.

SeongJae Park (8):
together: Add missing NBSPs for line numbers
together: Fix a wrong code line quotation
together: Fix wrong function name quotations
together: Add a missing comma
together: Append () suffix to function name quotation
together: Fix a wrong field citation
together: Fix a contextual typo
together: Improve struct field quotation readability

Quoted 3 lines
 together/applyrcu.tex | 14 +++++++-------
 together/refcnt.tex   | 10 +++++-----
 2 files changed, 12 insertions(+), 12 deletions(-)

Queued and pushed, thank you!

Thanx, Paul