Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752196AbdIRCHN (ORCPT ); Sun, 17 Sep 2017 22:07:13 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:44364 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752022AbdIRCHM (ORCPT ); Sun, 17 Sep 2017 22:07:12 -0400 To: "linux-doc@vger.kernel.org" , Jonathan Corbet Cc: LKML , Yury Norov From: Randy Dunlap Subject: [PATCH] Documentation: kernel-api: add bitmap operations from linux/bitmap.h Message-ID: <8dc0abb6-a138-29f8-f37c-27a1e545f098@infradead.org> Date: Sun, 17 Sep 2017 19:07:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1809 Lines: 56 From: Randy Dunlap Add to kernel-api Bitmap Operations section. Fix kernel-doc nitpicks in . Signed-off-by: Randy Dunlap Cc: Yury Norov --- 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)