Skip to contentSkip to conversation

lib/bitmap: Fix bitmap_scatter() and bitmap_gather() kernel doc

PATCH Applied Herve Codina 6 participants 7 messages Mar 14, 2024 – Mar 21, 2024

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

PATCH v2 1/1 lib/bitmap: Fix bitmap_scatter() and bitmap_gather() kernel doc

The make htmldoc command failed with the following error
... include/linux/bitmap.h:524: ERROR: Unexpected indentation.
... include/linux/bitmap.h:524: CRITICAL: Unexpected section title or transition.

Move the visual representation to a literal block.

Fixes de5f84338970 ("lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers")

---

Changes v1 -> v2
Add Fixes, Reported-by and Closes tags

 include/linux/bitmap.h | 44 ++++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 21 deletions(-)
include/linux/bitmap.h +23 -21
index fb3a9c93ac86..aa4096126553 100644
@@ -522,17 +522,18 @@ static inline void bitmap_replace(unsigned long *dst,
  *
  * (Bits 0, 1, 2, 3, 4, 5 are copied to the bits 0, 1, 4, 8, 9, 12)
  *
- * A more 'visual' description of the operation:
- * src:  0000000001011010
- *                 ||||||
- *          +------+|||||
- *          |  +----+||||
- *          |  |+----+|||
- *          |  ||   +-+||
- *          |  ||   |  ||
- * mask: ...v..vv...v..vv
- *       ...0..11...0..10
- * dst:  0000001100000010
+ * A more 'visual' description of the operation::
+ *
+ *	src:  0000000001011010
+ *	                ||||||
+ *	         +------+|||||
+ *	         |  +----+||||
+ *	         |  |+----+|||
+ *	         |  ||   +-+||
+ *	         |  ||   |  ||
+ *	mask: ...v..vv...v..vv
+ *	      ...0..11...0..10
+ *	dst:  0000001100000010
  *
  * A relationship exists between bitmap_scatter() and bitmap_gather().
  * bitmap_gather() can be seen as the 'reverse' bitmap_scatter() operation.
@@ -568,16 +569,17 @@ static inline void bitmap_scatter(unsigned long *dst, const unsigned long *src,
  *
  * (Bits 0, 1, 4, 8, 9, 12 are copied to the bits 0, 1, 2, 3, 4, 5)
  *
- * A more 'visual' description of the operation:
- * mask: ...v..vv...v..vv
- * src:  0000001100000010
- *          ^  ^^   ^   0
- *          |  ||   |  10
- *          |  ||   > 010
- *          |  |+--> 1010
- *          |  +--> 11010
- *          +----> 011010
- * dst:  0000000000011010
+ * A more 'visual' description of the operation::
+ *
+ *	mask: ...v..vv...v..vv
+ *	src:  0000001100000010
+ *	         ^  ^^   ^   0
+ *	         |  ||   |  10
+ *	         |  ||   > 010
+ *	         |  |+--> 1010
+ *	         |  +--> 11010
+ *	         +----> 011010
+ *	dst:  0000000000011010
  *
  * A relationship exists between bitmap_gather() and bitmap_scatter(). See
  * bitmap_scatter() for the bitmap scatter detailed operations.
Signature · 1 line
2.44.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 5 lines · Herve Codina

The make htmldoc command failed with the following error
... include/linux/bitmap.h:524: ERROR: Unexpected indentation.
... include/linux/bitmap.h:524: CRITICAL: Unexpected section title or transition.

Move the visual representation to a literal block.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on v2 1/1
#2 lore raw
In reply to Herve Codina
Quoted 52 lines · Herve Codina
include/linux/bitmap.h +16 -21
index fb3a9c93ac86..aa4096126553 100644
@@ -522,17 +522,18 @@ static inline void bitmap_replace(unsigned long *dst,
  *
  * (Bits 0, 1, 2, 3, 4, 5 are copied to the bits 0, 1, 4, 8, 9, 12)
  *
- * A more 'visual' description of the operation:
- * src:  0000000001011010
- *                 ||||||
- *          +------+|||||
- *          |  +----+||||
- *          |  |+----+|||
- *          |  ||   +-+||
- *          |  ||   |  ||
- * mask: ...v..vv...v..vv
- *       ...0..11...0..10
- * dst:  0000001100000010
+ * A more 'visual' description of the operation::
+ *
+ *	src:  0000000001011010
+ *	                ||||||
+ *	         +------+|||||
+ *	         |  +----+||||
+ *	         |  |+----+|||
+ *	         |  ||   +-+||
+ *	         |  ||   |  ||
+ *	mask: ...v..vv...v..vv
+ *	      ...0..11...0..10
+ *	dst:  0000001100000010
  *
  * A relationship exists between bitmap_scatter() and bitmap_gather().
  * bitmap_gather() can be seen as the 'reverse' bitmap_scatter() operation.
@@ -568,16 +569,17 @@ static inline void bitmap_scatter(unsigned long *dst, const unsigned long *src,
  *
  * (Bits 0, 1, 4, 8, 9, 12 are copied to the bits 0, 1, 2, 3, 4, 5)
  *
- * A more 'visual' description of the operation:
- * mask: ...v..vv...v..vv
- * src:  0000001100000010
- *          ^  ^^   ^   0
- *          |  ||   |  10
- *          |  ||   > 010
- *          |  |+--> 1010
- *          |  +--> 11010
- *          +----> 011010
- * dst:  0000000000011010
+ * A more 'visual' description of the operation::
+ *
+ *	mask: ...v..vv...v..vv
+ *	src:  0000001100000010

include/linux/bitmap.h static inline void bitmap_scatter(unsigned long *dst, const unsigned long *src, · line 585

Quoted 10 lines
include/linux/bitmap.h +7 -0
+ *	         ^  ^^   ^   0
+ *	         |  ||   |  10
+ *	         |  ||   > 010
+ *	         |  |+--> 1010
+ *	         |  +--> 11010
+ *	         +----> 011010
+ *	dst:  0000000000011010
  *
  * A relationship exists between bitmap_gather() and bitmap_scatter(). See
  * bitmap_scatter() for the bitmap scatter detailed operations.

LGTM, thanks!

Signature · 1 line
An old man doll... just what I always wanted! - Clara
maintainer
#3 lore raw
In reply to Herve Codina
Quoted 10 lines · On Thu, 14 Mar 2024 13:00:06 +0100 Herve Codina wrote:

The make htmldoc command failed with the following error
... include/linux/bitmap.h:524: ERROR: Unexpected indentation.
... include/linux/bitmap.h:524: CRITICAL: Unexpected section title or transition.

Move the visual representation to a literal block.

Fixes de5f84338970 ("lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers")

We took the offending commit via netdev, so I feel responsible. Please LMK if anyone else is planning to apply this fix, otherwise we'll take it and ship it to Linus on Thursday (19th).

maintainer Acked-by
#4 lore raw
Quoted 7 lines · Jakub Kicinski
Quoted 6 lines · On Thu, 14 Mar 2024 13:00:06 +0100 Herve Codina wrote:

The make htmldoc command failed with the following error
... include/linux/bitmap.h:524: ERROR: Unexpected indentation.
... include/linux/bitmap.h:524: CRITICAL: Unexpected section title or transition.

Move the visual representation to a literal block.

Quoted 8 lines
Quoted 4 lines
Fixes de5f84338970 ("lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers")

We took the offending commit via netdev, so I feel responsible. Please LMK if anyone else is planning to apply this fix, otherwise we'll take it and ship it to Linus on Thursday (19th).

Please go ahead and add my

maintainer
#5 lore raw
Quoted 7 lines · On Wed, 20 Mar 2024 11:34:40 -0700 Yury Norov wrote:
Quoted 3 lines

We took the offending commit via netdev, so I feel responsible. Please LMK if anyone else is planning to apply this fix, otherwise we'll take it and ship it to Linus on Thursday (19th).

Please go ahead and add my

Done, thank you!

#6 lore raw
In reply to Herve Codina
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 4 lines · On Thu, 14 Mar 2024 13:00:06 +0100 you wrote:

The make htmldoc command failed with the following error
... include/linux/bitmap.h:524: ERROR: Unexpected indentation.
... include/linux/bitmap.h:524: CRITICAL: Unexpected section title or transition.

Quoted 8 lines

Move the visual representation to a literal block.

Fixes de5f84338970 ("lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers")

[...]

Here is the summary with links:
- [v2] lib/bitmap: Fix bitmap_scatter() and bitmap_gather() kernel doc

    https://git.kernel.org/netdev/net/c/2d9d9f256c8c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html