Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1589082pxu; Sun, 6 Dec 2020 00:33:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxc//YLThC9pD5+NhbPsdw2JBEo6XCAMD1H4T/6cLE5yG2rEqAU+nZT0urJHJ9FjVyysN42 X-Received: by 2002:a05:6402:895:: with SMTP id e21mr15138367edy.284.1607243611577; Sun, 06 Dec 2020 00:33:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607243611; cv=none; d=google.com; s=arc-20160816; b=XK9UxhJrY/Qf+LlQYjITa21OFH4wBxMP0LqxDa8Lef/togFaFANnLmozZSgN2GgtZt YcvlooGOaBq0hkqmgmb8D+sgRtMRmKY5QGaqdDCxurlxgIaRGS6c32H2Rqr29fFeJLxF lMZJUqVN15luVJpp7sL0X81Y99LUgY3AMuH/3pBPcb9+V3NPYHOO+UoswL+LOLScgnm9 FKdY1ex/O4khbUk3M18qVGyN+F7wUXgVONPGaCV/AUCZHDeCStvLdPp1KCdfhs7NWjhJ lmfzHPeT+HuD4mc3ikT9WilXWctejWwSp1jKriW8YOlgSVgzGL3EDsPsMFSRZrRLR92H G7mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=qYxlF8eZ68L/OLzZJGFR5GH05oi0WLsOSmvgPSkH9o0=; b=Iu5gDDK8Dunm6IWSq4RIaoTLeYH78Uf9qbc+IOzrDruKdsaU8HZRweHj2nmlCCud/0 xFIbTF7jc2LcBk34qPiWiuReGapT6xDLKPNMBxmNcHimhYz6A1apKzhw7RTE8haxOhJ4 CCrzZ7jePFymHU5xG6xWs8qc4xxSJWN4EoTeF8GqrZdCEM1Rhc0V0PY50zpb/LzhWRqJ T9hUzGa8nIiCr3GuZtA6fjlETVWHXkdTcPtJ4dYSNdRp32GkU1IlEdXFWF6zJO1eKDGP iv3NXz7RMXgXquL15/LebePty1peoB5J5rfNggEccs7XLqWAUkSbnYRRFH2SXIw7Wp4k JwCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EvmuYdlL; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si4561248ejp.707.2020.12.06.00.33.09; Sun, 06 Dec 2020 00:33:31 -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=@linuxfoundation.org header.s=korg header.b=EvmuYdlL; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725973AbgLFIbq (ORCPT + 99 others); Sun, 6 Dec 2020 03:31:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:42776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgLFIbq (ORCPT ); Sun, 6 Dec 2020 03:31:46 -0500 Date: Sun, 6 Dec 2020 09:31:01 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1607243465; bh=gG+D2N0kxRvniYUcbpmdsHQy9H2+ijJ6pQARcCkRJmk=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=EvmuYdlLQnCa0N556ComZVtAzdo2LtE/wmfS2PyzQi5p6YP2Drg7eBmRBQE3ldy3l QFlbH0MJOzEy7N32yOt8qFA7bnQ9A7TI+ovdeJ0d19JT2qqWayAuZ//Ips3A/2mhfZ UE4hgSoi93HI/3XqoOMus8Q2qmFgg6LF10vFnFB4= From: Greg KH To: Levi Yun 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 Message-ID: References: <20201206064624.GA5871@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201206064624.GA5871@ubuntu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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