2023-12-15 18:42:34

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v1 0/2] bitmap-str: A couple of fixes

Imtended to be folded into original code, hence no proper commit messages.

Andy Shevchenko (2):
bitmap-str: Get rid of extern
bitmap-str: Add missing header(s)

include/linux/bitmap-str.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

--
2.43.0.rc1.1.gbec44491f096



2023-12-15 18:42:43

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v1 2/2] bitmap-str: Add missing header(s)

Signed-off-by: Andy Shevchenko <[email protected]>
---
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.43.0.rc1.1.gbec44491f096


2023-12-15 18:42:56

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v1 1/2] bitmap-str: Get rid of extern

Signed-off-by: Andy Shevchenko <[email protected]>
---
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.43.0.rc1.1.gbec44491f096


2023-12-15 19:01:36

by Yury Norov

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] bitmap-str: A couple of fixes

On Fri, Dec 15, 2023 at 08:41:07PM +0200, Andy Shevchenko wrote:
> Imtended to be folded into original code, hence no proper commit messages.

s/Imtended/Intended

Didn't understand why you didn't write commit messages. It breaks the
very basic rule. Can you elaborate?

> Andy Shevchenko (2):
> bitmap-str: Get rid of extern
> bitmap-str: Add missing header(s)
>
> include/linux/bitmap-str.h | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> --
> 2.43.0.rc1.1.gbec44491f096

2023-12-15 19:06:03

by Yury Norov

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] bitmap-str: Add missing header(s)

On Fri, Dec 15, 2023 at 08:41:09PM +0200, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> 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>

There's no sense in including this header without bitmap.h, and the
latter includes linux/types.h, so no need to include it here again.

If you want to make it more rigorous, you can do like this:

#ifndef __LINUX_BITMAP_H
#error "Don't include separately from linux/bitmap.h"
#endif

> 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.43.0.rc1.1.gbec44491f096

2023-12-15 19:14:42

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] bitmap-str: A couple of fixes

On Fri, Dec 15, 2023 at 11:01:12AM -0800, Yury Norov wrote:
> On Fri, Dec 15, 2023 at 08:41:07PM +0200, Andy Shevchenko wrote:
> > Imtended to be folded into original code, hence no proper commit messages.
>
> s/Imtended/Intended
>
> Didn't understand why you didn't write commit messages. It breaks the
> very basic rule. Can you elaborate?

I expected you to rebase your original commit.
Or based on my understanding of your comments I can submit a revert, if you wish.

--
With Best Regards,
Andy Shevchenko



2023-12-15 20:09:55

by Yury Norov

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] bitmap-str: A couple of fixes

On Fri, Dec 15, 2023 at 09:14:19PM +0200, Andy Shevchenko wrote:
> On Fri, Dec 15, 2023 at 11:01:12AM -0800, Yury Norov wrote:
> > On Fri, Dec 15, 2023 at 08:41:07PM +0200, Andy Shevchenko wrote:
> > > Imtended to be folded into original code, hence no proper commit messages.
> >
> > s/Imtended/Intended
> >
> > Didn't understand why you didn't write commit messages. It breaks the
> > very basic rule. Can you elaborate?
>
> I expected you to rebase your original commit.
> Or based on my understanding of your comments I can submit a revert, if you wish.

It's merged in v6.7-rc1. Can you send #1 as a proper patch? Regarding #2,
it's not needed because bitmap-str.h is a local header for bitmap.h.

Thanks,
Yury