Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: de5f84338970 ("lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>

authored by

Andy Shevchenko and committed by
Yury Norov
f54af4af 2408a807

+5 -3
+5 -3
include/linux/bitmap.h
··· 560 560 * ...0..11...0..10 561 561 * dst: 0000001100000010 562 562 * 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: 564 565 * bitmap_gather() can be seen as the 'reverse' bitmap_scatter() operation. 565 - * See bitmap_scatter() for details related to this relationship. 566 566 */ 567 567 static __always_inline 568 568 void bitmap_scatter(unsigned long *dst, const unsigned long *src, ··· 608 608 * dst: 0000000000011010 609 609 * 610 610 * 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 + * 612 614 * Suppose scattered computed using bitmap_scatter(scattered, src, mask, n). 613 615 * The operation bitmap_gather(result, scattered, mask, n) leads to a result 614 616 * equal or equivalent to src.