[PATCH v1 2/4] tools bitmap: Add missing asm-generic/bitsperlong.h include

Ian Rogers posted 4 patches 3 days, 7 hours ago
[PATCH v1 2/4] tools bitmap: Add missing asm-generic/bitsperlong.h include
Posted by Ian Rogers 3 days, 7 hours ago
small_const_nbits is defined in asm-generic/bitsperlong.h which
bitmap.h uses but doesn't include causing build failures in some build
systems. Add the missing #include.

Note the bitmap.h in tools has diverged from that of the kernel, so no
changes are made there.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/include/linux/bitmap.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/include/linux/bitmap.h b/tools/include/linux/bitmap.h
index d4d300040d01..0d992245c600 100644
--- a/tools/include/linux/bitmap.h
+++ b/tools/include/linux/bitmap.h
@@ -3,6 +3,7 @@
 #define _TOOLS_LINUX_BITMAP_H
 
 #include <string.h>
+#include <asm-generic/bitsperlong.h>
 #include <linux/align.h>
 #include <linux/bitops.h>
 #include <linux/find.h>
-- 
2.51.0.355.g5224444f11-goog
Re: [PATCH v1 2/4] tools bitmap: Add missing asm-generic/bitsperlong.h include
Posted by Yury Norov 2 days, 15 hours ago
On Fri, Sep 05, 2025 at 03:47:06PM -0700, Ian Rogers wrote:
> small_const_nbits is defined in asm-generic/bitsperlong.h which
> bitmap.h uses but doesn't include causing build failures in some build
> systems. Add the missing #include.
> 
> Note the bitmap.h in tools has diverged from that of the kernel, so no
> changes are made there.
> 
> Signed-off-by: Ian Rogers <irogers@google.com>

Acked-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>

> ---
>  tools/include/linux/bitmap.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/include/linux/bitmap.h b/tools/include/linux/bitmap.h
> index d4d300040d01..0d992245c600 100644
> --- a/tools/include/linux/bitmap.h
> +++ b/tools/include/linux/bitmap.h
> @@ -3,6 +3,7 @@
>  #define _TOOLS_LINUX_BITMAP_H
>  
>  #include <string.h>
> +#include <asm-generic/bitsperlong.h>
>  #include <linux/align.h>
>  #include <linux/bitops.h>
>  #include <linux/find.h>
> -- 
> 2.51.0.355.g5224444f11-goog