Re: [PATCH v2 2/2] bitmap-str: Add missing header(s)

From: Yury Norov
Date: Wed Apr 16 2025 - 12:56:19 EST


On Wed, Apr 16, 2025 at 09:32:11AM +0300, Andy Shevchenko wrote:
> bitmap-str.h is not self-contained, it uses something that is provided
> elsewhere, add missing header(s).

Can you be more specific? Is 'something' means the __user? If so, it's
provided in linux/compiler_types.h.

Can you add the compiler error you're trying to fix, or how did you
caught it?

Thanks,
Yury

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> include/linux/bitmap-str.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/bitmap-str.h b/include/linux/bitmap-str.h
> index d758b4809a3a..53d3e1b32d3d 100644
> --- a/include/linux/bitmap-str.h
> +++ b/include/linux/bitmap-str.h
> @@ -2,6 +2,8 @@
> #ifndef __LINUX_BITMAP_STR_H
> #define __LINUX_BITMAP_STR_H
>
> +#include <linux/types.h>
> +
> int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, unsigned long *dst, int nbits);
> int bitmap_print_to_pagebuf(bool list, char *buf, const unsigned long *maskp, int nmaskbits);
> int bitmap_print_bitmask_to_buf(char *buf, const unsigned long *maskp, int nmaskbits,
> --
> 2.47.2