[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ecccb89-ccef-5e2f-70fa-c5dce5f2a195@gmail.com>
Date: Mon, 7 Nov 2022 18:28:01 +0900
From: Akira Yokosawa <akiyks@...il.com>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
Akira Yokosawa <akiyks@...il.com>
Subject: Re: linux-next: build warning after merge of the rcu tree
[-Cc: sfr, linux-next, +Cc: rcu]
Hi Paul,
On Sun, 6 Nov 2022 21:02:12 -0800, Paul E. McKenney wrote:
> On Mon, Nov 07, 2022 at 02:26:41PM +1100, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the rcu tree, today's linux-next build (htmldocs)
>> produced this warning:
>>
>> Documentation/RCU/rcubarrier.rst:205: WARNING: Literal block ends without a blank line; unexpected unindent.
>>
>> Introduced by commit
>>
>> 21c2e3909721 ("doc: Update rcubarrier.rst")
>
> Huh. I guess that numbered code samples are not supposed to have more
> than nine lines?
No, the problem was that line 10 of the snippet had the same indent
level (ie, no indent) as the line above the snippet and was interpreted
as the end of literal block.
> Ah well, easy to fix by going back to left-justified
> numbers. I was wondering about that!
Appended is a POC patch (relative to current dev of -rcu tree) making
them right-justified and compatible with sphinx processing.
Hope this helps, Akira
>
> Apologies for the hassle!
>
> Thanx, Paul
diff --git a/Documentation/RCU/rcubarrier.rst b/Documentation/RCU/rcubarrier.rst
index 5a643e5233d5..9078511ec33d 100644
--- a/Documentation/RCU/rcubarrier.rst
+++ b/Documentation/RCU/rcubarrier.rst
@@ -193,16 +193,16 @@ which point, all earlier RCU callbacks are guaranteed to have completed.
The original code for rcu_barrier() was roughly as follows::
- 1 void rcu_barrier(void)
- 2 {
- 3 BUG_ON(in_interrupt());
- 4 /* Take cpucontrol mutex to protect against CPU hotplug */
- 5 mutex_lock(&rcu_barrier_mutex);
- 6 init_completion(&rcu_barrier_completion);
- 7 atomic_set(&rcu_barrier_cpu_count, 1);
- 8 on_each_cpu(rcu_barrier_func, NULL, 0, 1);
- 9 if (atomic_dec_and_test(&rcu_barrier_cpu_count))
- 10 complete(&rcu_barrier_completion);
+ 1 void rcu_barrier(void)
+ 2 {
+ 3 BUG_ON(in_interrupt());
+ 4 /* Take cpucontrol mutex to protect against CPU hotplug */
+ 5 mutex_lock(&rcu_barrier_mutex);
+ 6 init_completion(&rcu_barrier_completion);
+ 7 atomic_set(&rcu_barrier_cpu_count, 1);
+ 8 on_each_cpu(rcu_barrier_func, NULL, 0, 1);
+ 9 if (atomic_dec_and_test(&rcu_barrier_cpu_count))
+ 10 complete(&rcu_barrier_completion);
11 wait_for_completion(&rcu_barrier_completion);
12 mutex_unlock(&rcu_barrier_mutex);
13 }
--
Powered by blists - more mailing lists