From: Greg KH <gregkh@linuxfoundation.org>
To: Levi Yun <ppbuk5246@gmail.com>
Cc: akpm@linux-foundation.org, yury.norov@gmail.com,
andriy.shevchenko@linux.intel.com,
richard.weiyang@linux.alibaba.com, christian.brauner@ubuntu.com,
arnd@arndb.de, jpoimboe@redhat.com, changbin.du@intel.com,
rdunlap@infradead.org, masahiroy@kernel.org,
peterz@infradead.org, peter.enderborg@sony.com, krzk@kernel.org,
brendanhiggins@google.com, keescook@chromium.org,
broonie@kernel.org, matti.vaittinen@fi.rohmeurope.com,
mhiramat@kernel.org, jpa@git.mail.kapsi.fi,
nivedita@alum.mit.edu, glider@google.com, orson.zhai@unisoc.com,
takahiro.akashi@linaro.org, clm@fb.com, josef@toxicpanda.com,
dsterba@suse.com, dushistov@mail.ru,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 1/8] lib/find_bit.c: Add find_last_zero_bit
Date: Sun, 6 Dec 2020 09:31:01 +0100 [thread overview]
Message-ID: <X8yWxe/9gzosFOam@kroah.com> (raw)
In-Reply-To: <20201206064624.GA5871@ubuntu>
On Sun, Dec 06, 2020 at 03:46:24PM +0900, Levi Yun wrote:
> Inspired find_next_*_bit and find_last_bit, add find_last_zero_bit
> And add le support about find_last_bit and find_last_zero_bit.
>
> Signed-off-by: Levi Yun <ppbuk5246@gmail.com>
> ---
> lib/find_bit.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 62 insertions(+), 2 deletions(-)
>
> diff --git a/lib/find_bit.c b/lib/find_bit.c
> index 4a8751010d59..f9dda2bf7fa9 100644
> --- a/lib/find_bit.c
> +++ b/lib/find_bit.c
> @@ -90,7 +90,7 @@ unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size,
> EXPORT_SYMBOL(find_next_zero_bit);
> #endif
>
> -#if !defined(find_next_and_bit)
> +#ifndef find_next_and_bit
> unsigned long find_next_and_bit(const unsigned long *addr1,
> const unsigned long *addr2, unsigned long size,
> unsigned long offset)
> @@ -141,7 +141,7 @@ unsigned long find_last_bit(const unsigned long *addr, unsigned long size)
> {
> if (size) {
> unsigned long val = BITMAP_LAST_WORD_MASK(size);
> - unsigned long idx = (size-1) / BITS_PER_LONG;
> + unsigned long idx = (size - 1) / BITS_PER_LONG;
>
> do {
> val &= addr[idx];
This, and the change above this, are not related to this patch so you
might not want to include them.
Also, why is this patch series even needed? I don't see a justification
for it anywhere, only "what" this patch is, not "why".
thanks
greg k-h
next prev parent reply other threads:[~2020-12-06 8:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-06 6:46 [PATCH v2 1/8] lib/find_bit.c: Add find_last_zero_bit Levi Yun
2020-12-06 8:31 ` Greg KH [this message]
2020-12-06 8:39 ` Yun Levi
2020-12-06 8:45 ` Yun Levi
2020-12-06 8:56 ` Yun Levi
2020-12-06 9:01 ` Greg KH
2020-12-06 9:01 ` Nikolay Borisov
2020-12-06 9:15 ` Yun Levi
2020-12-08 22:54 ` Yun Levi
2020-12-07 15:33 ` Andy Shevchenko
2020-12-07 16:04 ` Yun Levi
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=X8yWxe/9gzosFOam@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=brendanhiggins@google.com \
--cc=broonie@kernel.org \
--cc=changbin.du@intel.com \
--cc=christian.brauner@ubuntu.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=dushistov@mail.ru \
--cc=glider@google.com \
--cc=josef@toxicpanda.com \
--cc=jpa@git.mail.kapsi.fi \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=krzk@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mhiramat@kernel.org \
--cc=nivedita@alum.mit.edu \
--cc=orson.zhai@unisoc.com \
--cc=peter.enderborg@sony.com \
--cc=peterz@infradead.org \
--cc=ppbuk5246@gmail.com \
--cc=rdunlap@infradead.org \
--cc=richard.weiyang@linux.alibaba.com \
--cc=takahiro.akashi@linaro.org \
--cc=yury.norov@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).