* [PATCH] Documentation: kernel-api: add bitmap operations from linux/bitmap.h
@ 2017-09-18 2:07 Randy Dunlap
2017-09-18 12:46 ` Yury Norov
2017-09-26 20:49 ` Jonathan Corbet
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2017-09-18 2:07 UTC (permalink / raw)
To: linux-doc, Jonathan Corbet; +Cc: LKML, Yury Norov
From: Randy Dunlap <rdunlap@infradead.org>
Add <linux/bitmap.h> to kernel-api Bitmap Operations section.
Fix kernel-doc nitpicks in <linux/bitmap.h>.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Yury Norov <ynorov@caviumnetworks.com>
---
Documentation/core-api/kernel-api.rst | 3 +++
include/linux/bitmap.h | 9 +++++----
2 files changed, 8 insertions(+), 4 deletions(-)
--- lnx-414-rc1.orig/Documentation/core-api/kernel-api.rst
+++ lnx-414-rc1/Documentation/core-api/kernel-api.rst
@@ -59,6 +59,9 @@ Bitmap Operations
.. kernel-doc:: lib/bitmap.c
:internal:
+.. kernel-doc:: include/linux/bitmap.h
+ :internal:
+
Command-line Parsing
--------------------
--- lnx-414-rc1.orig/include/linux/bitmap.h
+++ lnx-414-rc1/include/linux/bitmap.h
@@ -360,8 +360,9 @@ static inline int bitmap_parse(const cha
return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
}
-/*
+/**
* BITMAP_FROM_U64() - Represent u64 value in the format suitable for bitmap.
+ * @n: u64 value
*
* Linux bitmaps are internally arrays of unsigned longs, i.e. 32-bit
* integers in 32-bit environment, and 64-bit integers in 64-bit one.
@@ -392,14 +393,14 @@ static inline int bitmap_parse(const cha
((unsigned long) ((u64)(n) >> 32))
#endif
-/*
+/**
* bitmap_from_u64 - Check and swap words within u64.
* @mask: source bitmap
* @dst: destination bitmap
*
- * In 32-bit Big Endian kernel, when using (u32 *)(&val)[*]
+ * In 32-bit Big Endian kernel, when using ``(u32 *)(&val)[*]``
* to read u64 mask, we will get the wrong word.
- * That is "(u32 *)(&val)[0]" gets the upper 32 bits,
+ * That is ``(u32 *)(&val)[0]`` gets the upper 32 bits,
* but we expect the lower 32-bits of u64.
*/
static inline void bitmap_from_u64(unsigned long *dst, u64 mask)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Documentation: kernel-api: add bitmap operations from linux/bitmap.h
2017-09-18 2:07 [PATCH] Documentation: kernel-api: add bitmap operations from linux/bitmap.h Randy Dunlap
@ 2017-09-18 12:46 ` Yury Norov
2017-09-26 20:49 ` Jonathan Corbet
1 sibling, 0 replies; 3+ messages in thread
From: Yury Norov @ 2017-09-18 12:46 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-doc, Jonathan Corbet, LKML
On Sun, Sep 17, 2017 at 07:07:10PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Add <linux/bitmap.h> to kernel-api Bitmap Operations section.
> Fix kernel-doc nitpicks in <linux/bitmap.h>.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Yury Norov <ynorov@caviumnetworks.com>
Acked-by: Yury Norov <ynorov@caviumnetworks.com>
> ---
> Documentation/core-api/kernel-api.rst | 3 +++
> include/linux/bitmap.h | 9 +++++----
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> --- lnx-414-rc1.orig/Documentation/core-api/kernel-api.rst
> +++ lnx-414-rc1/Documentation/core-api/kernel-api.rst
> @@ -59,6 +59,9 @@ Bitmap Operations
> .. kernel-doc:: lib/bitmap.c
> :internal:
>
> +.. kernel-doc:: include/linux/bitmap.h
> + :internal:
> +
> Command-line Parsing
> --------------------
>
> --- lnx-414-rc1.orig/include/linux/bitmap.h
> +++ lnx-414-rc1/include/linux/bitmap.h
> @@ -360,8 +360,9 @@ static inline int bitmap_parse(const cha
> return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
> }
>
> -/*
> +/**
> * BITMAP_FROM_U64() - Represent u64 value in the format suitable for bitmap.
> + * @n: u64 value
> *
> * Linux bitmaps are internally arrays of unsigned longs, i.e. 32-bit
> * integers in 32-bit environment, and 64-bit integers in 64-bit one.
> @@ -392,14 +393,14 @@ static inline int bitmap_parse(const cha
> ((unsigned long) ((u64)(n) >> 32))
> #endif
>
> -/*
> +/**
> * bitmap_from_u64 - Check and swap words within u64.
> * @mask: source bitmap
> * @dst: destination bitmap
> *
> - * In 32-bit Big Endian kernel, when using (u32 *)(&val)[*]
> + * In 32-bit Big Endian kernel, when using ``(u32 *)(&val)[*]``
> * to read u64 mask, we will get the wrong word.
> - * That is "(u32 *)(&val)[0]" gets the upper 32 bits,
> + * That is ``(u32 *)(&val)[0]`` gets the upper 32 bits,
> * but we expect the lower 32-bits of u64.
> */
> static inline void bitmap_from_u64(unsigned long *dst, u64 mask)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Documentation: kernel-api: add bitmap operations from linux/bitmap.h
2017-09-18 2:07 [PATCH] Documentation: kernel-api: add bitmap operations from linux/bitmap.h Randy Dunlap
2017-09-18 12:46 ` Yury Norov
@ 2017-09-26 20:49 ` Jonathan Corbet
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2017-09-26 20:49 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-doc, LKML, Yury Norov
On Sun, 17 Sep 2017 19:07:10 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> Add <linux/bitmap.h> to kernel-api Bitmap Operations section.
> Fix kernel-doc nitpicks in <linux/bitmap.h>.
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-28 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18 2:07 [PATCH] Documentation: kernel-api: add bitmap operations from linux/bitmap.h Randy Dunlap
2017-09-18 12:46 ` Yury Norov
2017-09-26 20:49 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®