Skip to contentSkip to conversation

mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block

PATCH In review Bagas Sanjaya 3 participants 4 messages Jun 10, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block

Sphinx reports htmldocs warnings:

Documentation/core-api/mm-api:40: ./mm/slub.c:4936: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils] Documentation/core-api/mm-api:40: ./mm/slub.c:4936: ERROR: Undefined substitution referenced: "--------". [docutils]

Fix the warning by wrapping krealloc() semantics diagram for __GFP_ZERO in literal code block.

Fixes 489a744e5fb1 ("mm: krealloc: clarify valid usage of __GFP_ZERO")
---
 mm/slub.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
mm/slub.c +5 -5
index 31e11ef256f90a..45a963e363d32b 100644
@@ -4930,12 +4930,12 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
  * When slub_debug_orig_size() is off, krealloc() only knows about the bucket
  * size of an allocation (but not the exact size it was allocated with) and
  * hence implements the following semantics for shrinking and growing buffers
- * with __GFP_ZERO.
+ * with __GFP_ZERO::
  *
- *         new             bucket
- * 0       size             size
- * |--------|----------------|
- * |  keep  |      zero      |
+ *           new             bucket
+ *   0       size             size
+ *   |--------|----------------|
+ *   |  keep  |      zero      |
  *
  * Otherwise, the original allocation size 'orig_size' could be used to
  * precisely clear the requested size, and the new size will also be stored
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw
Quoted 11 lines · Bagas Sanjaya

Sphinx reports htmldocs warnings:

Documentation/core-api/mm-api:40: ./mm/slub.c:4936: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils] Documentation/core-api/mm-api:40: ./mm/slub.c:4936: ERROR: Undefined substitution referenced: "--------". [docutils]

Fix the warning by wrapping krealloc() semantics diagram for __GFP_ZERO in literal code block.

Fixes 489a744e5fb1 ("mm: krealloc: clarify valid usage of __GFP_ZERO")

---

Hmm not sure what I am missing, but neither make htmldocs on my machine nor docs.kernel.org [1] list kerneldoc for *_noprof() functions properly (which should have been listed), so no errors show up...

[1] https://docs.kernel.org/core-api/mm-api.html

Quoted 28 lines
 mm/slub.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
mm/slub.c +5 -5
index 31e11ef256f90a..45a963e363d32b 100644
@@ -4930,12 +4930,12 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
  * When slub_debug_orig_size() is off, krealloc() only knows about the bucket
  * size of an allocation (but not the exact size it was allocated with) and
  * hence implements the following semantics for shrinking and growing buffers
- * with __GFP_ZERO.
+ * with __GFP_ZERO::
  *
- *         new             bucket
- * 0       size             size
- * |--------|----------------|
- * |  keep  |      zero      |
+ *           new             bucket
+ *   0       size             size
+ *   |--------|----------------|
+ *   |  keep  |      zero      |
  *
  * Otherwise, the original allocation size 'orig_size' could be used to
  * precisely clear the requested size, and the new size will also be stored
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Signature · 2 lines
Cheers,
Harry / Hyeonggon
#2 lore raw
Quoted 13 lines · Harry Yoo
Quoted 11 lines · Bagas Sanjaya

Sphinx reports htmldocs warnings:

Documentation/core-api/mm-api:40: ./mm/slub.c:4936: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils] Documentation/core-api/mm-api:40: ./mm/slub.c:4936: ERROR: Undefined substitution referenced: "--------". [docutils]

Fix the warning by wrapping krealloc() semantics diagram for __GFP_ZERO in literal code block.

Fixes 489a744e5fb1 ("mm: krealloc: clarify valid usage of __GFP_ZERO")

---

Quoted 5 lines

Hmm not sure what I am missing, but neither make htmldocs on my machine nor docs.kernel.org [1] list kerneldoc for *_noprof() functions properly (which should have been listed), so no errors show up...

[1] https://docs.kernel.org/core-api/mm-api.html

I was encountering the warnings on docs-next (see MAINTAINERS), something that I forget to mention when posting this patch.

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#3 lore raw
In reply to Bagas Sanjaya
Quoted 4 lines · Bagas Sanjaya

Sphinx reports htmldocs warnings:

Documentation/core-api/mm-api:40: ./mm/slub.c:4936: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils] Documentation/core-api/mm-api:40: ./mm/slub.c:4936: ERROR: Undefined substitution referenced: "--------". [docutils]

Jon already fixed this. I've picked it up into my current set of slab patches.