aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bitmap.c
diff options
context:
space:
mode:
authorYury Norov <[email protected]>2021-05-07 01:02:46 +0000
committerLinus Torvalds <[email protected]>2021-05-07 02:24:11 +0000
commite5b9252d9000fc82324af5864701c1daffeebd7e (patch)
tree4d37f4781d1e4c608e020ab0e062b942d437b610 /tools/lib/bitmap.c
parenttools: disable -Wno-type-limits (diff)
downloadkernel-e5b9252d9000fc82324af5864701c1daffeebd7e.tar.gz
kernel-e5b9252d9000fc82324af5864701c1daffeebd7e.zip
tools: bitmap: sync function declarations with the kernel
Some functions in tools/include/linux/bitmap.h declare nbits as int. In the kernel nbits is declared as unsigned int. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Yury Norov <[email protected]> Acked-by: Rasmus Villemoes <[email protected]> Cc: Alexey Klimov <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: David Sterba <[email protected]> Cc: Dennis Zhou <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Jianpeng Ma <[email protected]> Cc: Joe Perches <[email protected]> Cc: John Paul Adrian Glaubitz <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Rich Felker <[email protected]> Cc: Stefano Brivio <[email protected]> Cc: Wei Yang <[email protected]> Cc: Wolfram Sang <[email protected]> Cc: Yoshinori Sato <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/lib/bitmap.c')
-rw-r--r--tools/lib/bitmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/bitmap.c b/tools/lib/bitmap.c
index 5043747ef6c5..f4e914712b6f 100644
--- a/tools/lib/bitmap.c
+++ b/tools/lib/bitmap.c
@@ -28,11 +28,11 @@ void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
dst[k] = bitmap1[k] | bitmap2[k];
}
-size_t bitmap_scnprintf(unsigned long *bitmap, int nbits,
+size_t bitmap_scnprintf(unsigned long *bitmap, unsigned int nbits,
char *buf, size_t size)
{
/* current bit is 'cur', most recently seen range is [rbot, rtop] */
- int cur, rbot, rtop;
+ unsigned int cur, rbot, rtop;
bool first = true;
size_t ret = 0;