linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Syed Nayyar Waris <syednwaris@gmail.com>
Cc: William Breathitt Gray <vilhelm.gray@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v10 1/4] bitops: Introduce the for_each_set_clump macro
Date: Mon, 5 Oct 2020 12:35:38 +0300	[thread overview]
Message-ID: <20201005093538.GM3956970@smile.fi.intel.com> (raw)
In-Reply-To: <CACG_h5roN0dKGYMcZ3BXNzSMAWdU06mAx8NrpuomaubSRfdm-A@mail.gmail.com>

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@gmail.com> wrote:
> > On Sat, Oct 3, 2020 at 3:56 PM William Breathitt Gray
> > <vilhelm.gray@gmail.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@gmail.com> wrote:
> > > > > On Sat, Oct 3, 2020 at 2:14 PM Andy Shevchenko
> > > > > <andy.shevchenko@gmail.com> wrote:
> > > > > > On Sat, Oct 3, 2020 at 2:51 AM Syed Nayyar Waris <syednwaris@gmail.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



  reply	other threads:[~2020-10-05  9:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 23:47 [PATCH v10 0/4] Introduce the for_each_set_clump macro Syed Nayyar Waris
2020-10-02 23:48 ` [PATCH v10 1/4] bitops: " Syed Nayyar Waris
2020-10-03  8:44   ` Andy Shevchenko
2020-10-03 11:36     ` Syed Nayyar Waris
2020-10-03 12:45       ` Andy Shevchenko
2020-10-03 12:56         ` William Breathitt Gray
2020-10-03 13:02           ` Andy Shevchenko
2020-10-03 15:08             ` Syed Nayyar Waris
2020-10-05  9:35               ` Andy Shevchenko [this message]
2020-10-02 23:49 ` [PATCH v10 2/4] lib/test_bitmap.c: Add for_each_set_clump test cases Syed Nayyar Waris
2020-10-02 23:51 ` [PATCH v10 3/4] gpio: thunderx: Utilize for_each_set_clump macro Syed Nayyar Waris
2020-10-02 23:52 ` [PATCH v10 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value Syed Nayyar Waris

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=20201005093538.GM3956970@smile.fi.intel.com \
    --to=andy.shevchenko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syednwaris@gmail.com \
    --cc=vilhelm.gray@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).