From: Yury Norov <yury.norov@gmail.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linux-kernel@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v2 2/6] bitmap: replace _reg_op(REG_OP_ALLOC) with bitmap_set()
Date: Fri, 11 Aug 2023 05:56:02 -0700 [thread overview]
Message-ID: <ZNYv4pt4HBUBZA60@yury-ThinkPad> (raw)
In-Reply-To: <25deb65e-a8f3-957b-9e4f-759604111d50@rasmusvillemoes.dk>
On Fri, Aug 11, 2023 at 08:21:33AM +0200, Rasmus Villemoes wrote:
> On 11/08/2023 02.57, Yury Norov wrote:
> > _reg_op(REG_OP_ALLOC) duplicates bitmap_set(). Fix it.
> >
> > Signed-off-by: Yury Norov <yury.norov@gmail.com>
> > ---
> > lib/bitmap.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/bitmap.c b/lib/bitmap.c
> > index 3a589016f5e0..c9afe704fe4b 100644
> > --- a/lib/bitmap.c
> > +++ b/lib/bitmap.c
> > @@ -1352,9 +1352,12 @@ EXPORT_SYMBOL(bitmap_release_region);
> > */
> > int bitmap_allocate_region(unsigned long *bitmap, unsigned int pos, int order)
> > {
> > + unsigned int nbits = pos + BIT(order);
> > +
>
> That really doesn't sound right. Have you added self-tests for these
> functions first and then used those to catch regressions?
When bitmap_allocate_region() is broken, almost every arch build fails
to boot. Can you explain what exactly looks wrong to you?
Thanks,
Yury
next prev parent reply other threads:[~2023-08-11 12:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 0:57 [PATCH v2 0/6] bitmap: cleanup bitmap_*_region() implementation Yury Norov
2023-08-11 0:57 ` [PATCH v2 1/6] bitmap: fix opencoded bitmap_allocate_region() Yury Norov
2023-08-11 0:57 ` [PATCH v2 2/6] bitmap: replace _reg_op(REG_OP_ALLOC) with bitmap_set() Yury Norov
2023-08-11 6:21 ` Rasmus Villemoes
2023-08-11 12:56 ` Yury Norov [this message]
2023-08-11 13:31 ` Rasmus Villemoes
2023-08-14 0:39 ` Yury Norov
2023-08-11 9:25 ` Andy Shevchenko
2023-08-11 13:01 ` Yury Norov
2023-08-11 0:57 ` [PATCH v2 3/6] bitmap: replace _reg_op(REG_OP_RELEASE) with bitmap_clear() Yury Norov
2023-08-11 0:57 ` [PATCH v2 4/6] bitmap: replace _reg_op(REG_OP_ISFREE) with find_next_bit() Yury Norov
2023-08-11 0:57 ` [PATCH v2 5/6] bitmap: drop _reg_op() function Yury Norov
2023-08-11 0:57 ` [PATCH v2 6/6] bitmap: move bitmap_*_region functions to bitmap.h Yury Norov
2023-08-11 9:27 ` Andy Shevchenko
2023-08-11 13:05 ` Yury Norov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZNYv4pt4HBUBZA60@yury-ThinkPad \
--to=yury.norov@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.