* [PATCH v2 0/2] bitmap-str: A couple of cleanups
@ 2025-04-16 6:32 Andy Shevchenko
2025-04-16 6:32 ` [PATCH v2 1/2] bitmap-str: Get rid of 'extern' for function prototypes Andy Shevchenko
2025-04-16 6:32 ` [PATCH v2 2/2] bitmap-str: Add missing header(s) Andy Shevchenko
0 siblings, 2 replies; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-16 6:32 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel; +Cc: Yury Norov, Rasmus Villemoes
A couple of simple cleanups to the bitmap-str.h.
In v2:
- filled the commit messages (Yury)
Andy Shevchenko (2):
bitmap-str: Get rid of 'extern' for function prototypes
bitmap-str: Add missing header(s)
include/linux/bitmap-str.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--
2.47.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] bitmap-str: Get rid of 'extern' for function prototypes
2025-04-16 6:32 [PATCH v2 0/2] bitmap-str: A couple of cleanups Andy Shevchenko
@ 2025-04-16 6:32 ` Andy Shevchenko
2025-04-16 6:32 ` [PATCH v2 2/2] bitmap-str: Add missing header(s) Andy Shevchenko
1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-16 6:32 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel; +Cc: Yury Norov, Rasmus Villemoes
The bitmap-str.h uses mixed style for function prototypes. Drop
the 'extern' as it easier to read and makes style aligned with
a new code in the kernel.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/bitmap-str.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/bitmap-str.h b/include/linux/bitmap-str.h
index 17caeca94cab..d758b4809a3a 100644
--- a/include/linux/bitmap-str.h
+++ b/include/linux/bitmap-str.h
@@ -4,10 +4,10 @@
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);
-extern int bitmap_print_bitmask_to_buf(char *buf, const unsigned long *maskp,
- int nmaskbits, loff_t off, size_t count);
-extern int bitmap_print_list_to_buf(char *buf, const unsigned long *maskp,
- int nmaskbits, loff_t off, size_t count);
+int bitmap_print_bitmask_to_buf(char *buf, const unsigned long *maskp, int nmaskbits,
+ loff_t off, size_t count);
+int bitmap_print_list_to_buf(char *buf, const unsigned long *maskp, int nmaskbits,
+ loff_t off, size_t count);
int bitmap_parse(const char *buf, unsigned int buflen, unsigned long *dst, int nbits);
int bitmap_parselist(const char *buf, unsigned long *maskp, int nmaskbits);
int bitmap_parselist_user(const char __user *ubuf, unsigned int ulen,
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] bitmap-str: Add missing header(s)
2025-04-16 6:32 [PATCH v2 0/2] bitmap-str: A couple of cleanups Andy Shevchenko
2025-04-16 6:32 ` [PATCH v2 1/2] bitmap-str: Get rid of 'extern' for function prototypes Andy Shevchenko
@ 2025-04-16 6:32 ` Andy Shevchenko
2025-04-16 16:56 ` Yury Norov
1 sibling, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-16 6:32 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel; +Cc: Yury Norov, Rasmus Villemoes
bitmap-str.h is not self-contained, it uses something that is provided
elsewhere, add missing header(s).
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] bitmap-str: Add missing header(s)
2025-04-16 6:32 ` [PATCH v2 2/2] bitmap-str: Add missing header(s) Andy Shevchenko
@ 2025-04-16 16:56 ` Yury Norov
2025-04-16 17:47 ` Andy Shevchenko
0 siblings, 1 reply; 5+ messages in thread
From: Yury Norov @ 2025-04-16 16:56 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-kernel, Rasmus Villemoes
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@linux.intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] bitmap-str: Add missing header(s)
2025-04-16 16:56 ` Yury Norov
@ 2025-04-16 17:47 ` Andy Shevchenko
0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-16 17:47 UTC (permalink / raw)
To: Yury Norov; +Cc: linux-kernel, Rasmus Villemoes
On Wed, Apr 16, 2025 at 12:56:08PM -0400, Yury Norov wrote:
> 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.
bool, __user is defined in compiler_*.h which is guaranteed to be included by
types.h
> Can you add the compiler error you're trying to fix, or how did you
> caught it?
It's by reading the code.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-16 17:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16 6:32 [PATCH v2 0/2] bitmap-str: A couple of cleanups Andy Shevchenko
2025-04-16 6:32 ` [PATCH v2 1/2] bitmap-str: Get rid of 'extern' for function prototypes Andy Shevchenko
2025-04-16 6:32 ` [PATCH v2 2/2] bitmap-str: Add missing header(s) Andy Shevchenko
2025-04-16 16:56 ` Yury Norov
2025-04-16 17:47 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox