Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1551111pxu; Sat, 5 Dec 2020 22:51:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2gbiO7w6wF3IBxhguYB8C2jAN/J2ky2WZO7yqV9Q+jfSh5GYw0wQUy4yV59hYTjZ0DTWf X-Received: by 2002:aa7:cf8f:: with SMTP id z15mr11461805edx.17.1607237506943; Sat, 05 Dec 2020 22:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607237506; cv=none; d=google.com; s=arc-20160816; b=iawZplF8Fdhh7nAgFHWrZb+iHqkNrD4mBIEdeMzvzGETHU3xrAA9Ch5eIFC007E+f6 DHFOjatCRg67Z2Sn6JIZNzGujd7MGO3DbL2slYoaHHeOuV28z/C15/A3ZPhQXayHyw2x dlafOQFrxnvmvsyV+iY+fMr1ubdhMkzopCaYNsvwJu6ZSZka6K4vXeGJzPH6eRqz7E43 Jd9Q8RP8aT7E5SPO01FwwgkjrJOQTqRUdJ9zOBsaABFnztg3z5wjr1ZGkFXZkt+Z4ADB tDeSBJteZUnZeyTV1z0NBmOlLWGfvTXwEDqqSLSQbsSg1UdRfdjtGExMRC+45JI5t1tO 1heA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=BSumPRorxhYM+yM2n0c7LX3KunZP5zaLLWlWEG1gKAk=; b=b83spPlLUzYatVGdw3eB8urHp8bnBo5G0f9bXt93PiViwSt98gZn9h7kOW3YJr+50d waD6vJ0OwXGZX88T3FrgNs7ZDSSCBIcI0ef+c833TcoEiafIpoCPqxSmFjLuGL8+N5Wu yGS18efY5YXfrChO03cSB8KCMJIPsLoypXZrhUubiBwHs6NbICoLGdbWx2/utI5PuRB2 scOojmBZ/8K2vNDWwwLXHnODSrlfujGFfcAOvuWTT6hlzoi9R4yXe8ueyQhXz34et7rQ xvuEmvh/xqUBzzK6GeXKuaDjLbeDT6Fi+lcOxsz+5yMmgrUcxmQuVot4pMtw62Dora3V vcXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q7hcXkt4; 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 i19si950318edq.373.2020.12.05.22.51.24; Sat, 05 Dec 2020 22:51:46 -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=q7hcXkt4; 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 S1726230AbgLFGtZ (ORCPT + 99 others); Sun, 6 Dec 2020 01:49:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbgLFGtZ (ORCPT ); Sun, 6 Dec 2020 01:49:25 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C642C0613D0; Sat, 5 Dec 2020 22:48:45 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id iq13so5526034pjb.3; Sat, 05 Dec 2020 22:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=BSumPRorxhYM+yM2n0c7LX3KunZP5zaLLWlWEG1gKAk=; b=q7hcXkt4db0YUyJbU8dEm8m4wT7h2tRSIWGRqBYhrvUqDCa2tCD90naJVOmzv8TSgj L+I+Jqe5jDBdkZwCToRXr3FBBH4Wu0os8eqOmF+ndusd7kLuznDpt1jlggxqqyw2lR/m As41sw2wmx3+OAonQHF03m2n+X7g5x63cO30N7gGJ4LqQEy9yqgOQnXwYQU2qODC1ucO wYFI2KsFpZRseWtwa7eZkePDLhYpFVoXJcJGBNO1ZOZN5fGoEG4So5vteLuCCa2nAOCu X0i/+ler0oQ1CMi8IcaWTWF9Q6Bhr3WtFKJUdoa6diYPRX7dt75byiCni1Uwxfce4dw7 2diA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=BSumPRorxhYM+yM2n0c7LX3KunZP5zaLLWlWEG1gKAk=; b=KbahLEsJ6onKSx7riqn6Ij19UxNOx3GhG0rc1QpZYuOPRZGuY0MzGQNQXGbaim4j/6 QVLZc16bCt++xTkfNP5ruGGdv8mEFjytT0LKURet2JlhGMjsi+l3ZEjVMGQ/tPTPwgC5 c6nyKMf7uC+WRTDaE7UI6PTj4L02d9D7lB8Ku24V181Q7aPOTQ/tiFU6uSHN1fBKXP6z 5JHrz+XR3+U1D4i+RzD2y1YvaW0qPVGcBzZZQ87d69MJOVNixNcyWd1mZVKbW8VMHeXP xsYRcQXNRloCCHFMCq1/8FsokvBO6MvjxgcomPOxCYAt6vWZ0L73SMbrPtkZke4IwgCu qicw== X-Gm-Message-State: AOAM532rMD9Pw1s+jNyqEUOwj20E5Z11sbZDrEbkzaWth+ISpLpMACNU yQyFXTQdBnHDRsxr13LEmgk= X-Received: by 2002:a17:90a:a10c:: with SMTP id s12mr11572479pjp.86.1607237324441; Sat, 05 Dec 2020 22:48:44 -0800 (PST) Received: from ubuntu ([211.226.85.205]) by smtp.gmail.com with ESMTPSA id gm2sm7009349pjb.35.2020.12.05.22.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2020 22:48:43 -0800 (PST) Date: Sun, 6 Dec 2020 15:48:32 +0900 From: Levi Yun To: 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, gregkh@linuxfoundation.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 Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: [PATCH v2 4/8] bitops/le.h: Add le support for find_last_bit Message-ID: <20201206064832.GA6114@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Inspired find_next_*_bit function series, add find_last_zero_bit. These patch adds declarations for find_last_zero_bit. This patch is for le support of find_last_bit and find_last_bit_zero. Signed-off-by: Levi Yun --- include/asm-generic/bitops/le.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h index 188d3eba3ace..3d6661cc8077 100644 --- a/include/asm-generic/bitops/le.h +++ b/include/asm-generic/bitops/le.h @@ -27,6 +27,18 @@ static inline unsigned long find_first_zero_bit_le(const void *addr, return find_first_zero_bit(addr, size); } +static inline unsigned long find_last_bit_le(const void *addr, + unsigned long size) +{ + return find_last_bit(addr, size); +} + +static inline unsigned long find_last_zero_bit_le(const void *addr, + unsigned long size) +{ + return find_last_zero_bit(addr, size); +} + #elif defined(__BIG_ENDIAN) #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) @@ -46,6 +58,14 @@ extern unsigned long find_next_bit_le(const void *addr, find_next_zero_bit_le((addr), (size), 0) #endif +#ifndef find_last_zero_bit_le +extern unsigned long find_last_zero_bit_le(const void *addr, unsigned long size); +#endif + +#ifndef find_last_bit_le +extern unsigned long find_last_bit_le(const void *addr, unsigned long size); +#endif + #else #error "Please fix " #endif -- 2.27.0