Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1594717pxu; Sun, 6 Dec 2020 00:49:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkA26a13H/zo9xIyAI8j8N8YcqzIZtFKLm9e29CQ+vnJLTKnvvaeDBqAcTlSjT3gKupZN3 X-Received: by 2002:a17:906:5c43:: with SMTP id c3mr14653475ejr.390.1607244542195; Sun, 06 Dec 2020 00:49:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607244542; cv=none; d=google.com; s=arc-20160816; b=OrcRTvkZJug2t6rFm7CJFVcHxZBeFwbKi5zGWU86cRgOHXxk7ieUiuuJ6qWlVMIkEs TtxOMHizderzI0dQm602U2scNoq1q0GZGa8UAlGWzovwgJ5IMrtZBUnDksBO3eidECFf pN1YXNSqYIWshTyKsVqspFSeDHXpgSTRQI6f/27T+Cy0h4YMGvFPSl5DRykWP/4i766t 0HBGtyY35thT5p4hrDWGyanZXCjTioOU1S3bLwshqD0xuudv0qu5k76d1QJzAakmTcKA nu02WC5CGxxGpe8MpKP5MLLlAflqaOANWW6obyJjwlekgRvwMM8Hj9U/ulvQN4YoUsgO OjZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=VFydP16aQgSOYZnYU7/OlYLKjUicVKh61lfiFMpnZts=; b=i8Lup/u7tVBQiic0Aaqd8wx7B28k6nYYPHkaaM553dDj5uwhCnomGa4KK1TW74oQRL cnwlnBpgHMy6NPcuK7JH95w46Lk+WUUdMIVX4+qGjheu6KMMFj7LVeGf6FdiUMMfvopq 9FTVJEUmXG/x4jaAcUQIWAk0oGssv6v9RONZNMc7qe5iDxdMoA4CrdvTjaMg0858l3eh AS7NWk04KqPKCS9s559yFXK+e6RWKtXJXfD3v0U2LYYNwVCebA1DR/ci68stT9RURVt6 UJitPpCMZd7F21sNK4wGMPvbDWmaZLyGeT+ux9sgrYDuFhVjeGX8o09n2Au8IYPb8/fW /kuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jqNgAhpb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b20si6128162edv.300.2020.12.06.00.48.38; Sun, 06 Dec 2020 00:49:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jqNgAhpb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726024AbgLFIqQ (ORCPT + 99 others); Sun, 6 Dec 2020 03:46:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgLFIqP (ORCPT ); Sun, 6 Dec 2020 03:46:15 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DD10C0613D0; Sun, 6 Dec 2020 00:45:29 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id e7so9579759wrv.6; Sun, 06 Dec 2020 00:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VFydP16aQgSOYZnYU7/OlYLKjUicVKh61lfiFMpnZts=; b=jqNgAhpbTyB50/v0hzFe7KzXFtpZOthuqD3u07KgsEbduNLeqWxJBHKIfEB0G8R0JS FMy7Xlz2zszv2GmDBDwbUbpP0zWQrI32hIUoRagrWLl2/pBgX95gMpmfHC+m/PdUJsZZ fA9OWn2ZSkED5NFpNgu8EP5uqbxnOgRvqT98mccNmpMhgJFvOjf6+Y9BML134UiIcQty PHmv5+rQb8uydoE0cGIvrW58v6YQWwhyOwiezAq1zBodNo9Bk0qK6LQm+GVVXomTfUJ6 hEWtDePoZNMV79aGUIO0cUv1nTKkNmKtfbQRw7lfN/yz6j1fmh9lOjWXHU5BbXVr1URU 6Zjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VFydP16aQgSOYZnYU7/OlYLKjUicVKh61lfiFMpnZts=; b=Lii+dSaSC7uwxSYOcaV3RFEkx73tlj7fu5a7Ku4RdXtPV1rVkVTDF6y64BxrCI9Ftf EV8o5p9rJqRXOKueZGgqmHBK6GEsaivst9P90hRdQUpSOO/jlaRy8pmY9JF38pZaa6yZ wGeNRy/7Ea6Ff7iYY+KAuHzmHWisfpi03BEAx14daFOIXC6sgWTnumQurhTxA3maJnSs A1Py4dSNRL+L52v2YRJeg+5cycD28MCAcaRRRjf+rWExwAYqUBJHHeb+Xt5MYnZScZUJ uO3sPvI+P0grUleG7dip2uZGzqy16wdxByz3niegTjgsKtnYjY3/32ml0r+TLCTciIDX 1I0w== X-Gm-Message-State: AOAM533OXaZNEYsKbOeaAIqDmuFAVrZcmnoBy+L2bk5ZMQN5K2qDJGqY hW7rYEv6YEt6HKK63E/OpISTPFNxWgMKoGR9oUg= X-Received: by 2002:adf:bd84:: with SMTP id l4mr14090824wrh.41.1607244327663; Sun, 06 Dec 2020 00:45:27 -0800 (PST) MIME-Version: 1.0 References: <20201206064624.GA5871@ubuntu> In-Reply-To: From: Yun Levi Date: Sun, 6 Dec 2020 17:45:14 +0900 Message-ID: Subject: Re: [PATCH v2 1/8] lib/find_bit.c: Add find_last_zero_bit To: Greg KH Cc: Andrew Morton , Yury Norov , Andy Shevchenko , richard.weiyang@linux.alibaba.com, christian.brauner@ubuntu.com, Arnd Bergmann , Josh Poimboeuf , rdunlap@infradead.org, masahiroy@kernel.org, peterz@infradead.org, peter.enderborg@sony.com, krzk@kernel.org, Brendan Higgins , Kees Cook , broonie@kernel.org, matti.vaittinen@fi.rohmeurope.com, mhiramat@kernel.org, jpa@git.mail.kapsi.fi, nivedita@alum.mit.edu, Alexander Potapenko , orson.zhai@unisoc.com, Takahiro Akashi , clm@fb.com, Josef Bacik , dsterba@suse.com, dushistov@mail.ru, Linux Kernel Mailing List , linux-arch@vger.kernel.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry, in 7'th patch (not 8th). Thanks Levi. On Sun, Dec 6, 2020 at 5:31 PM Greg KH wrote: > > 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 > > --- > > 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