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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D60B9C433F5 for ; Sun, 28 Nov 2021 08:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356922AbhK1IHK (ORCPT ); Sun, 28 Nov 2021 03:07:10 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:39560 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356924AbhK1IFF (ORCPT ); Sun, 28 Nov 2021 03:05:05 -0500 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 D1043B80B51; Sun, 28 Nov 2021 08:01:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E507C004E1; Sun, 28 Nov 2021 08:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1638086506; bh=b48YjTY/pVez8afNE+wzU+3WaQKxxQEURvaxADRtwDg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Cf1UpbBDGUG/i+3B7710UJDtWCf5AiS+xYwJdJrswHkaMxwXqtghSrAeHqtG4ZEHm kjNjM7/02WtoShcjN6FHzZa/U5USbrnlhn4XjHsJy9PjfumjC3FQHsmSzJbZZYb97a uqjFGttZAm3d3AQ44noz4515EJlyQkKjujhY+AU0= Date: Sun, 28 Nov 2021 09:01:41 +0100 From: Greg Kroah-Hartman To: Yury Norov Cc: linux-kernel@vger.kernel.org, "James E.J. Bottomley" , "Martin K. Petersen" , "Paul E. McKenney" , "Rafael J. Wysocki" , Alexander Shishkin , Alexey Klimov , Amitkumar Karwar , Andi Kleen , Andrew Lunn , Andrew Morton , Andy Gross , Andy Lutomirski , Andy Shevchenko , Anup Patel , Ard Biesheuvel , Arnaldo Carvalho de Melo , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christoph Hellwig , Christoph Lameter , Daniel Vetter , Dave Hansen , David Airlie , David Laight , Dennis Zhou , Dinh Nguyen , Geetha sowjanya , Geert Uytterhoeven , Guo Ren , Hans de Goede , Heiko Carstens , Ian Rogers , Ingo Molnar , Jakub Kicinski , Jason Wessel , Jens Axboe , Jiri Olsa , Jonathan Cameron , Juri Lelli , Kalle Valo , Kees Cook , Krzysztof Kozlowski , Lee Jones , Marc Zyngier , Marcin Wojtas , Mark Gross , Mark Rutland , Matti Vaittinen , Mauro Carvalho Chehab , Mel Gorman , Michael Ellerman , Mike Marciniszyn , Nicholas Piggin , Palmer Dabbelt , Peter Zijlstra , Petr Mladek , Randy Dunlap , Rasmus Villemoes , Roy Pledge , Russell King , Saeed Mahameed , Sagi Grimberg , Sergey Senozhatsky , Solomon Peachy , Stephen Boyd , Stephen Rothwell , Steven Rostedt , Subbaraya Sundeep , Sudeep Holla , Sunil Goutham , Tariq Toukan , Tejun Heo , Thomas Bogendoerfer , Thomas Gleixner , Ulf Hansson , Vincent Guittot , Vineet Gupta , Viresh Kumar , Vivien Didelot , Vlastimil Babka , Will Deacon , bcm-kernel-feedback-list@broadcom.com, kvm@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-snps-arc@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le} Message-ID: References: <20211128035704.270739-1-yury.norov@gmail.com> <20211128035704.270739-4-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211128035704.270739-4-yury.norov@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 27, 2021 at 07:56:58PM -0800, Yury Norov wrote: > bitmap_weight() counts all set bits in the bitmap unconditionally. > However in some cases we can traverse a part of bitmap when we > only need to check if number of set bits is greater, less or equal > to some number. > > This patch replaces bitmap_weight() with one of > bitmap_{empty,full,eq,gt,le), as appropriate. > > In some places driver code has been optimized further, where it's > trivial. > > Signed-off-by: Yury Norov > --- > arch/nds32/kernel/perf_event_cpu.c | 4 +--- > arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 ++-- > arch/x86/kvm/hyperv.c | 8 ++++---- > drivers/crypto/ccp/ccp-dev-v5.c | 5 +---- > drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- > drivers/iio/adc/mxs-lradc-adc.c | 3 +-- > drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++-- > drivers/iio/industrialio-buffer.c | 2 +- > drivers/iio/industrialio-trigger.c | 2 +- > drivers/memstick/core/ms_block.c | 4 ++-- > drivers/net/dsa/b53/b53_common.c | 2 +- > drivers/net/ethernet/broadcom/bcmsysport.c | 6 +----- > drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 4 ++-- > drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +- > .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +- > .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 8 ++++---- > .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- > drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 +++------- > drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++-- > drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- > .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- > drivers/net/ethernet/qlogic/qed/qed_dev.c | 3 +-- > drivers/net/ethernet/qlogic/qed/qed_rdma.c | 4 ++-- > drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 +- > drivers/perf/arm-cci.c | 2 +- > drivers/perf/arm_pmu.c | 4 ++-- > drivers/perf/hisilicon/hisi_uncore_pmu.c | 2 +- > drivers/perf/thunderx2_pmu.c | 3 +-- > drivers/perf/xgene_pmu.c | 2 +- > drivers/pwm/pwm-pca9685.c | 2 +- > drivers/staging/media/tegra-video/vi.c | 2 +- > drivers/thermal/intel/intel_powerclamp.c | 10 ++++------ > fs/ocfs2/cluster/heartbeat.c | 14 +++++++------- > 33 files changed, 57 insertions(+), 75 deletions(-) After you get the new functions added to the kernel tree, this patch should be broken up into one-patch-per-subsystem and submitted through the various subsystem trees. thanks, greg k-h