All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs/vm: fix Unexpected indentation warns in page_owner
@ 2021-12-15  0:19 Shuah Khan
  2021-12-15  1:05 ` Akira Yokosawa
  0 siblings, 1 reply; 6+ messages in thread
From: Shuah Khan @ 2021-12-15  0:19 UTC (permalink / raw)
  To: corbet, akpm; +Cc: Shuah Khan, linux-doc, linux-kernel

Fix Unexpected indentation warns in page_owner:

Documentation/vm/page_owner.rst:92: WARNING: Unexpected indentation.
Documentation/vm/page_owner.rst:96: WARNING: Unexpected indentation.
Documentation/vm/page_owner.rst:107: WARNING: Unexpected indentation.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
---
 Documentation/vm/page_owner.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/vm/page_owner.rst b/Documentation/vm/page_owner.rst
index 9837fc8147dd..9a3af6aafa09 100644
--- a/Documentation/vm/page_owner.rst
+++ b/Documentation/vm/page_owner.rst
@@ -89,11 +89,11 @@ Usage
 
 	Page allocated via order XXX, ...
 	PFN XXX ...
-	 // Detailed stack
+	// Detailed stack
 
 	Page allocated via order XXX, ...
 	PFN XXX ...
-	 // Detailed stack
+	// Detailed stack
 
    The ``page_owner_sort`` tool ignores ``PFN`` rows, puts the remaining rows
    in buf, uses regexp to extract the page order value, counts the times
@@ -104,7 +104,7 @@ Usage
 
 	XXX times, XXX pages:
 	Page allocated via order XXX, ...
-	 // Detailed stack
+	// Detailed stack
 
    By default, ``page_owner_sort`` is sorted according to the times of buf.
    If you want to sort by the pages nums of buf, use the ``-m`` parameter.
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/vm: fix Unexpected indentation warns in page_owner
  2021-12-15  0:19 [PATCH] docs/vm: fix Unexpected indentation warns in page_owner Shuah Khan
@ 2021-12-15  1:05 ` Akira Yokosawa
  2021-12-15 15:10   ` Shuah Khan
  0 siblings, 1 reply; 6+ messages in thread
From: Akira Yokosawa @ 2021-12-15  1:05 UTC (permalink / raw)
  To: Shuah Khan; +Cc: akpm, corbet, linux-doc, linux-kernel

Hi,

On Tue, 14 Dec 2021 17:19:29 -0700, Shuah Khan wrote:
> Fix Unexpected indentation warns in page_owner:
> 
> Documentation/vm/page_owner.rst:92: WARNING: Unexpected indentation.
> Documentation/vm/page_owner.rst:96: WARNING: Unexpected indentation.
> Documentation/vm/page_owner.rst:107: WARNING: Unexpected indentation.

I guess these outputs should have been literal blocks.
Then Sphinx wouldn't complain about indentations.

        Thanks, Akira

> 
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
> ---
>  Documentation/vm/page_owner.rst | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/vm/page_owner.rst b/Documentation/vm/page_owner.rst
> index 9837fc8147dd..9a3af6aafa09 100644
> --- a/Documentation/vm/page_owner.rst
> +++ b/Documentation/vm/page_owner.rst
> @@ -89,11 +89,11 @@ Usage
>  
>  	Page allocated via order XXX, ...
>  	PFN XXX ...
> -	 // Detailed stack
> +	// Detailed stack
>  
>  	Page allocated via order XXX, ...
>  	PFN XXX ...
> -	 // Detailed stack
> +	// Detailed stack
>  
>     The ``page_owner_sort`` tool ignores ``PFN`` rows, puts the remaining rows
>     in buf, uses regexp to extract the page order value, counts the times
> @@ -104,7 +104,7 @@ Usage
>  
>  	XXX times, XXX pages:
>  	Page allocated via order XXX, ...
> -	 // Detailed stack
> +	// Detailed stack
>  
>     By default, ``page_owner_sort`` is sorted according to the times of buf.
>     If you want to sort by the pages nums of buf, use the ``-m`` parameter.
> -- 
> 2.32.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/vm: fix Unexpected indentation warns in page_owner
  2021-12-15  1:05 ` Akira Yokosawa
@ 2021-12-15 15:10   ` Shuah Khan
  2021-12-16 14:45     ` Shuah Khan
  0 siblings, 1 reply; 6+ messages in thread
From: Shuah Khan @ 2021-12-15 15:10 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: akpm, corbet, linux-doc, linux-kernel, Shuah Khan

On 12/14/21 6:05 PM, Akira Yokosawa wrote:
> Hi,
> 
> On Tue, 14 Dec 2021 17:19:29 -0700, Shuah Khan wrote:
>> Fix Unexpected indentation warns in page_owner:
>>
>> Documentation/vm/page_owner.rst:92: WARNING: Unexpected indentation.
>> Documentation/vm/page_owner.rst:96: WARNING: Unexpected indentation.
>> Documentation/vm/page_owner.rst:107: WARNING: Unexpected indentation.
> 
> I guess these outputs should have been literal blocks.
> Then Sphinx wouldn't complain about indentations.

Good point. I will take a look and send v2.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/vm: fix Unexpected indentation warns in page_owner
  2021-12-15 15:10   ` Shuah Khan
@ 2021-12-16 14:45     ` Shuah Khan
  2021-12-16 15:00       ` Akira Yokosawa
  0 siblings, 1 reply; 6+ messages in thread
From: Shuah Khan @ 2021-12-16 14:45 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: akpm, corbet, linux-doc, linux-kernel, Shuah Khan

On 12/15/21 8:10 AM, Shuah Khan wrote:
> On 12/14/21 6:05 PM, Akira Yokosawa wrote:
>> Hi,
>>
>> On Tue, 14 Dec 2021 17:19:29 -0700, Shuah Khan wrote:
>>> Fix Unexpected indentation warns in page_owner:
>>>
>>> Documentation/vm/page_owner.rst:92: WARNING: Unexpected indentation.
>>> Documentation/vm/page_owner.rst:96: WARNING: Unexpected indentation.
>>> Documentation/vm/page_owner.rst:107: WARNING: Unexpected indentation.
>>
>> I guess these outputs should have been literal blocks.
>> Then Sphinx wouldn't complain about indentations.
> 
> Good point. I will take a look and send v2.
> 

This is already in a literal block. A few of the lines in a literal block
are missing indentations - this patch is good as is.

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/vm: fix Unexpected indentation warns in page_owner
  2021-12-16 14:45     ` Shuah Khan
@ 2021-12-16 15:00       ` Akira Yokosawa
  2021-12-16 18:10         ` Shuah Khan
  0 siblings, 1 reply; 6+ messages in thread
From: Akira Yokosawa @ 2021-12-16 15:00 UTC (permalink / raw)
  To: Shuah Khan; +Cc: akpm, corbet, linux-doc, linux-kernel, Akira Yokosawa

On Thu, 16 Dec 2021 07:45:50 -0700, Shuah Khan wrote:
> On 12/15/21 8:10 AM, Shuah Khan wrote:
>> On 12/14/21 6:05 PM, Akira Yokosawa wrote:
>>> Hi,
>>>
>>> On Tue, 14 Dec 2021 17:19:29 -0700, Shuah Khan wrote:
>>>> Fix Unexpected indentation warns in page_owner:
>>>>
>>>> Documentation/vm/page_owner.rst:92: WARNING: Unexpected indentation.
>>>> Documentation/vm/page_owner.rst:96: WARNING: Unexpected indentation.
>>>> Documentation/vm/page_owner.rst:107: WARNING: Unexpected indentation.
>>>
>>> I guess these outputs should have been literal blocks.
>>> Then Sphinx wouldn't complain about indentations.
>>
>> Good point. I will take a look and send v2.
>>
> 
> This is already in a literal block. A few of the lines in a literal block
> are missing indentations - this patch is good as is.

Well, to show the context, embedding from current page_owner.rst.
My comment is on the line starting with "#".

-----8<------
4) Analyze information from page owner::

	cat /sys/kernel/debug/page_owner > page_owner_full.txt
	./page_owner_sort page_owner_full.txt sorted_page_owner.txt

   The general output of ``page_owner_full.txt`` is as follows:
#  ^^^ this unindent to the level of "Analyze" above ends the literal block,
#  so the final ":" needs to be "::".
	Page allocated via order XXX, ...
	PFN XXX ...
	 // Detailed stack

	Page allocated via order XXX, ...
	PFN XXX ...
	 // Detailed stack
-----8<------
 
Ditto for another output.

Hope this helps you!

        Thanks, Akira
> 
> thanks,
> -- Shuah
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/vm: fix Unexpected indentation warns in page_owner
  2021-12-16 15:00       ` Akira Yokosawa
@ 2021-12-16 18:10         ` Shuah Khan
  0 siblings, 0 replies; 6+ messages in thread
From: Shuah Khan @ 2021-12-16 18:10 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: akpm, corbet, linux-doc, linux-kernel, Shuah Khan

On 12/16/21 8:00 AM, Akira Yokosawa wrote:
> On Thu, 16 Dec 2021 07:45:50 -0700, Shuah Khan wrote:
>> On 12/15/21 8:10 AM, Shuah Khan wrote:
>>> On 12/14/21 6:05 PM, Akira Yokosawa wrote:
>>>> Hi,
>>>>
>>>> On Tue, 14 Dec 2021 17:19:29 -0700, Shuah Khan wrote:
>>>>> Fix Unexpected indentation warns in page_owner:
>>>>>
>>>>> Documentation/vm/page_owner.rst:92: WARNING: Unexpected indentation.
>>>>> Documentation/vm/page_owner.rst:96: WARNING: Unexpected indentation.
>>>>> Documentation/vm/page_owner.rst:107: WARNING: Unexpected indentation.
>>>>
>>>> I guess these outputs should have been literal blocks.
>>>> Then Sphinx wouldn't complain about indentations.
>>>
>>> Good point. I will take a look and send v2.
>>>
>>
>> This is already in a literal block. A few of the lines in a literal block
>> are missing indentations - this patch is good as is.
> 
> Well, to show the context, embedding from current page_owner.rst.
> My comment is on the line starting with "#".
> 
> -----8<------
> 4) Analyze information from page owner::
> 
> 	cat /sys/kernel/debug/page_owner > page_owner_full.txt
> 	./page_owner_sort page_owner_full.txt sorted_page_owner.txt
> 
>     The general output of ``page_owner_full.txt`` is as follows:
> #  ^^^ this unindent to the level of "Analyze" above ends the literal block,
> #  so the final ":" needs to be "::".
> 	Page allocated via order XXX, ...
> 	PFN XXX ...
> 	 // Detailed stack
> 
> 	Page allocated via order XXX, ...
> 	PFN XXX ...
> 	 // Detailed stack
> -----8<------
>   

Yes. I understood you comment and made the exact change. What I wasn't
sure about is the flow of the text in the document and if the literal
block was just missed or the entire text is supposed to be in a single
block.

I now have a real example text from /sys/kernel/debug/page_owner to
use a real example and fix the warn at the same time.

thanks,
-- Shuah



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-16 18:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15  0:19 [PATCH] docs/vm: fix Unexpected indentation warns in page_owner Shuah Khan
2021-12-15  1:05 ` Akira Yokosawa
2021-12-15 15:10   ` Shuah Khan
2021-12-16 14:45     ` Shuah Khan
2021-12-16 15:00       ` Akira Yokosawa
2021-12-16 18:10         ` Shuah Khan

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.