From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13936C433F5 for ; Mon, 20 Dec 2021 20:53:55 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JHsJK75RGz30RS for ; Tue, 21 Dec 2021 07:53:53 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=enGWQQJi; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=2604:1380:4601:e00::1; helo=ams.source.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=enGWQQJi; dkim-atps=neutral Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JHlhl2pvtz3dqQ for ; Tue, 21 Dec 2021 03:41:11 +1100 (AEDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 500EDB80F98; Mon, 20 Dec 2021 16:41:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8EC6C36AE2; Mon, 20 Dec 2021 16:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1640018465; bh=TuP185pT5gdSlNtfNfQ+Kye5lOB+euhTli9+HNxshOM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=enGWQQJij7Gn5KXQIvc6DgLGhW8TsmstPvfbBL0Frpv76daIROB5Wk6RyCml6X1M0 INr/wU0RVuAcWcOkPbgbi5U7MaR0NTk6+o3rhiyEe0vywSW27g/jS59FjbvlDzhRr3 ovNt3nB3npaxHStYKaqE8ptag4HrP8L17DKCvcbQ= Date: Mon, 20 Dec 2021 17:41:02 +0100 From: Greg Kroah-Hartman To: Yury Norov Subject: Re: [PATCH 08/17] all: replace bitmap_weight with bitmap_weight_{eq,gt,ge,lt,le} where appropriate Message-ID: References: <20211218212014.1315894-1-yury.norov@gmail.com> <20211218212014.1315894-9-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211218212014.1315894-9-yury.norov@gmail.com> X-Mailman-Approved-At: Tue, 21 Dec 2021 07:53:15 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Andrew Lunn , "Rafael J. Wysocki" , Catalin Marinas , Guo Ren , Christoph Lameter , Christoph Hellwig , Andi Kleen , Vincent Guittot , Ingo Molnar , Geert Uytterhoeven , Mel Gorman , Viresh Kumar , Petr Mladek , Arnaldo Carvalho de Melo , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Jens Axboe , Andy Lutomirski , Lee Jones , Randy Dunlap , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Sergey Senozhatsky , Thomas Gleixner , linux-crypto@vger.kernel.org, Joe Perches , Andrew Morton , Mark Rutland , Anup Patel , linux-ia64@vger.kernel.org, David Airlie , Dave Hansen , Solomon Peachy , Stephen Rothwell , Krzysztof Kozlowski , Dennis Zhou , Matti Vaittinen , Sudeep Holla , Tejun Heo , linux-arm-kernel@lists.infradead.org, Stephen Boyd , Tariq Toukan , Jonathan Cameron , Ulf Hansson , Emil Renner Berthing , Alexander Shishkin , Mike Marciniszyn , Rasmus Villemoes , Subbaraya Sundeep , Will Deacon , Sagi Grimberg , linux-csky@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-snps-arc@lists.infradead.org, Kees Cook , Arnd Bergmann , "James E.J. Bottomley" , Vineet Gupta , Steven Rostedt , Mark Gross , Borislav Petkov , Mauro Carvalho Chehab , Thomas Bogendoerfer , "Martin K. Petersen" , David Laight , linux-alpha@vger.kernel.org, Geetha sowjanya , Ian Rogers , kvm@vger.kernel.org, Peter Zijlstra , Amitkumar Karwar , linux-mm@kvack.org, linux-riscv@lists.infradead.org, Jiri Olsa , Ard Biesheuvel , Marc Zyngier , Russell King , Andy Gross , Jakub Kicinski , Vivien Didelot , Sunil Goutham , "Paul E. McKenney" , linux-s390@vger.kernel.org, Alexey Klimov , Heiko Carstens , Hans de Goede , Nicholas Piggin , Marcin Wojtas , Vlastimil Babka , linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, Palmer Dabbelt , Daniel Vetter , Jason Wessel , Saeed Mahameed , Andy Shevchenko Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sat, Dec 18, 2021 at 01:20:04PM -0800, Yury Norov wrote: > Kernel code calls bitmap_weight() to compare the weight of bitmap with > a given number. We can do it more efficiently with bitmap_weight_{eq, ...} > because conditional bitmap_weight may stop traversing the bitmap earlier, > as soon as condition is met. > > This patch replaces bitmap_weight with conditional versions where possible, > except for small bitmaps which size is not configurable and known at > constant time. In that case conditional version of bitmap_weight would not > benefit due to small_const_nbits() optimization; but readability may > suffer. > > Signed-off-by: Yury Norov > --- > arch/x86/kernel/cpu/resctrl/rdtgroup.c | 2 +- > drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++-- > drivers/iio/industrialio-trigger.c | 2 +- > drivers/memstick/core/ms_block.c | 4 ++-- > drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +- > .../net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +- > .../net/ethernet/marvell/octeontx2/nic/otx2_flows.c | 4 ++-- > drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 +++------- > drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++-- > drivers/net/ethernet/mellanox/mlx4/fw.c | 4 ++-- > drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- > drivers/perf/thunderx2_pmu.c | 4 ++-- > drivers/staging/media/tegra-video/vi.c | 2 +- > 13 files changed, 21 insertions(+), 25 deletions(-) "all" is not how to submit changes to the kernel. Please break them up into subsystem-specific patches, and send them after your core changes are accepted. good luck! greg k-h