Skip to contentSkip to conversation

docs: arm64: Fix indentation and doc formatting

PATCH In review Adam Zerella 2 participants 3 messages Sep 28, 2019 – Oct 1, 2019 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: arm64: Fix indentation and doc formatting

Sphinx generates the following warnings for the arm64 doc pages:

Documentation/arm64/memory.rst:158: WARNING: Unexpected indentation. Documentation/arm64/memory.rst:162: WARNING: Unexpected indentation.

These indentations warnings can be resolved by utilising code hightlighting instead.

---
 Documentation/arm64/memory.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Documentation/arm64/memory.rst +7 -2
index b040909e45f8..f7db6a3898c5 100644
@@ -154,11 +154,16 @@ return virtual addresses to userspace from a 48-bit range.
 
 Software can "opt-in" to receiving VAs from a 52-bit space by
 specifying an mmap hint parameter that is larger than 48-bit.
-For example:
-    maybe_high_address = mmap(~0UL, size, prot, flags,...);
+
+.. code-block:: c
+
+   maybe_high_address = mmap(~0UL, size, prot, flags,...);
 
 It is also possible to build a debug kernel that returns addresses
 from a 52-bit space by enabling the following kernel config options:
+
+.. code-block:: sh
+
    CONFIG_EXPERT=y && CONFIG_ARM64_FORCE_52BIT=y
 
 Note that this option is only intended for debugging applications
Signature · 1 line
2.20.1
#1 lore raw
Quoted 19 lines · Adam Zerella

Sphinx generates the following warnings for the arm64 doc pages:

Documentation/arm64/memory.rst:158: WARNING: Unexpected indentation. Documentation/arm64/memory.rst:162: WARNING: Unexpected indentation.

These indentations warnings can be resolved by utilising code hightlighting instead.

---
 Documentation/arm64/memory.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Documentation/arm64/memory.rst +0 -0
index b040909e45f8..f7db6a3898c5 100644

Documentation/arm64/memory.rst return virtual addresses to userspace from a 48-bit range. · line 160

Quoted 9 lines
Documentation/arm64/memory.rst +4 -2
@@ -154,11 +154,16 @@ return virtual addresses to userspace from a 48-bit range.
 
 Software can "opt-in" to receiving VAs from a 52-bit space by
 specifying an mmap hint parameter that is larger than 48-bit.
-For example:
-    maybe_high_address = mmap(~0UL, size, prot, flags,...);
+
+.. code-block:: c
+
+   maybe_high_address = mmap(~0UL, size, prot, flags,...);

Why did you drop the "For example:" prefix?

Will

#2 lore raw
Quoted 21 lines · Will Deacon
Quoted 20 lines · Adam Zerella

Sphinx generates the following warnings for the arm64 doc pages:

Documentation/arm64/memory.rst:158: WARNING: Unexpected indentation. Documentation/arm64/memory.rst:162: WARNING: Unexpected indentation.

These indentations warnings can be resolved by utilising code hightlighting instead.

---
 Documentation/arm64/memory.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Documentation/arm64/memory.rst +0 -0
index b040909e45f8..f7db6a3898c5 100644
@@ -154,11 +154,16 @@ return virtual addresses to userspace from a 48-bit range.
 
Quoted 11 lines

Documentation/arm64/memory.rst return virtual addresses to userspace from a 48-bit range. · line 160

Quoted 8 lines
Documentation/arm64/memory.rst +4 -2
 Software can "opt-in" to receiving VAs from a 52-bit space by
 specifying an mmap hint parameter that is larger than 48-bit.
-For example:
-    maybe_high_address = mmap(~0UL, size, prot, flags,...);
+
+.. code-block:: c
+
+   maybe_high_address = mmap(~0UL, size, prot, flags,...);

Why did you drop the "For example:" prefix?

No reason, I initially thought it would be a bit cleaner but since it is a code example not an _actual_ snippet it makes more sense to keep it.

I've attached a v2 patch.

Quoted 1 line

Will

Sphinx generates the following warnings for the arm64 doc pages:

Documentation/arm64/memory.rst:158: WARNING: Unexpected indentation. Documentation/arm64/memory.rst:162: WARNING: Unexpected indentation.

These indentations warnings can be resolved by utilising code hightlighting instead.

---

v2: Adding back the 'For example' text before the code example.

---
 Documentation/arm64/memory.rst | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Documentation/arm64/memory.rst +8 -1
index b040909e45f8..02e02175e6f5 100644
@@ -154,11 +154,18 @@ return virtual addresses to userspace from a 48-bit range.
 
 Software can "opt-in" to receiving VAs from a 52-bit space by
 specifying an mmap hint parameter that is larger than 48-bit.
+
 For example:
-    maybe_high_address = mmap(~0UL, size, prot, flags,...);
+
+.. code-block:: c
+
+   maybe_high_address = mmap(~0UL, size, prot, flags,...);
 
 It is also possible to build a debug kernel that returns addresses
 from a 52-bit space by enabling the following kernel config options:
+
+.. code-block:: sh
+
    CONFIG_EXPERT=y && CONFIG_ARM64_FORCE_52BIT=y
 
 Note that this option is only intended for debugging applications
Signature · 1 line
2.21.0