Skip to content

Commit f54af4a

Browse files
andy-shevYuryNorov
authored andcommitted
bitmap: Align documentation between bitmap_gather() and bitmap_scatter()
The bitmap_scatter() mistakenly refers to itself for detailed explanation about the relationships of two. Instead of simply fixing this, align text in both making a cross-reference. Fixes: de5f843 ("lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers") Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Yury Norov <[email protected]>
1 parent 2408a80 commit f54af4a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/linux/bitmap.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,9 @@ void bitmap_replace(unsigned long *dst,
560560
* ...0..11...0..10
561561
* dst: 0000001100000010
562562
*
563-
* A relationship exists between bitmap_scatter() and bitmap_gather().
563+
* A relationship exists between bitmap_scatter() and bitmap_gather(). See
564+
* bitmap_gather() for the bitmap gather detailed operations. TL;DR:
564565
* bitmap_gather() can be seen as the 'reverse' bitmap_scatter() operation.
565-
* See bitmap_scatter() for details related to this relationship.
566566
*/
567567
static __always_inline
568568
void bitmap_scatter(unsigned long *dst, const unsigned long *src,
@@ -608,7 +608,9 @@ void bitmap_scatter(unsigned long *dst, const unsigned long *src,
608608
* dst: 0000000000011010
609609
*
610610
* A relationship exists between bitmap_gather() and bitmap_scatter(). See
611-
* bitmap_scatter() for the bitmap scatter detailed operations.
611+
* bitmap_scatter() for the bitmap scatter detailed operations. TL;DR:
612+
* bitmap_scatter() can be seen as the 'reverse' bitmap_gather() operation.
613+
*
612614
* Suppose scattered computed using bitmap_scatter(scattered, src, mask, n).
613615
* The operation bitmap_gather(result, scattered, mask, n) leads to a result
614616
* equal or equivalent to src.

0 commit comments

Comments
 (0)