[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201005093538.GM3956970@smile.fi.intel.com>
Date: Mon, 5 Oct 2020 12:35:38 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Syed Nayyar Waris <syednwaris@...il.com>
Cc: William Breathitt Gray <vilhelm.gray@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Linux-Arch <linux-arch@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v10 1/4] bitops: Introduce the for_each_set_clump macro
On Sat, Oct 03, 2020 at 08:38:14PM +0530, Syed Nayyar Waris wrote:
> On Sat, Oct 3, 2020 at 6:32 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Sat, Oct 3, 2020 at 3:56 PM William Breathitt Gray
> > <vilhelm.gray@...il.com> wrote:
> > > On Sat, Oct 03, 2020 at 03:45:04PM +0300, Andy Shevchenko wrote:
> > > > On Sat, Oct 3, 2020 at 2:37 PM Syed Nayyar Waris <syednwaris@...il.com> wrote:
> > > > > On Sat, Oct 3, 2020 at 2:14 PM Andy Shevchenko
> > > > > <andy.shevchenko@...il.com> wrote:
> > > > > > On Sat, Oct 3, 2020 at 2:51 AM Syed Nayyar Waris <syednwaris@...il.com> wrote:
...
> > > > > > > + map[index] &= ~BITMAP_FIRST_WORD_MASK(start);
> > > > > > > + map[index] |= value << offset;
> > > >
> > > > Side note: I would prefer + 0 here and there, but it's up to you.
>
> Andy what do you mean by the above statement, can you please clarify?
> Can you please elaborate on the above statement.
Sure. I meant something like
map[index + 0] &= ~BITMAP_FIRST_WORD_MASK(start);
map[index + 0] |= value << offset;
> > > > > > > + map[index + 1] &= ~BITMAP_LAST_WORD_MASK(start + nbits);
> > > > > > > + map[index + 1] |= (value >> space);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists