From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Wed, 4 Dec 2019 16:17:25 +0200 From: Leon Romanovsky Subject: Re: [PATCH v4 7/8] linux/log2.h: Fix 64bit calculations in roundup/down_pow_two() Message-ID: <20191204141725.GA4939@unreal> References: <20191203114743.1294-1-nsaenzjulienne@suse.de> <20191203114743.1294-8-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191203114743.1294-8-nsaenzjulienne@suse.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Nicolas Saenz Julienne Cc: linux-pci@vger.kernel.org, Michael Turquette , "J. Bruce Fields" , linux-nfs@vger.kernel.org, Edward Cree , linux-clk@vger.kernel.org, f.fainelli@gmail.com, Herbert Xu , Emilio =?iso-8859-1?Q?L=F3pez?= , maz@kernel.org, Joerg Roedel , phil@raspberrypi.org, Doug Ledford , Jason Gunthorpe , Chen-Yu Tsai , Chuck Lever , Martin Habets , wahrenst@gmx.net, Tom Lendacky , Jiri Pirko , Solarflare linux maintainers , Maxime Ripard , linux-rpi-kernel@lists.infradead.org, Anna Schumaker , Bjorn Helgaas , Trond Myklebust , linux-arm-kernel@lists.infradead.org, Mirko Lindner , Mike Marciniszyn , mbrugger@suse.com, Stephen Boyd , netdev@vger.kernel.org, Yishai Hadas , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, "David S. Miller" , Stephen Hemminger , linux-rdma@vger.kernel.org, iommu@lists.linux-foundation.org, Moni Shoua , Eric Biederman , james.quinlan@broadcom.com, Thomas Graf , andrew.murray@arm.com, Robin Murphy , David Woodhouse , Dennis Dalessandro , Lu Baolu On Tue, Dec 03, 2019 at 12:47:40PM +0100, Nicolas Saenz Julienne wrote: > Some users need to make sure their rounding function accepts and returns > 64bit long variables regardless of the architecture. Sadly > roundup/rounddown_pow_two() takes and returns unsigned longs. It turns > out ilog2() already handles 32/64bit calculations properly, and being > the building block to the round functions we can rework them as a > wrapper around it. > > Suggested-by: Robin Murphy > Signed-off-by: Nicolas Saenz Julienne > --- > drivers/clk/clk-divider.c | 8 ++-- > drivers/clk/sunxi/clk-sunxi.c | 2 +- > drivers/infiniband/hw/hfi1/chip.c | 4 +- > drivers/infiniband/hw/hfi1/init.c | 4 +- > drivers/infiniband/hw/mlx4/srq.c | 2 +- > drivers/infiniband/hw/mthca/mthca_srq.c | 2 +- > drivers/infiniband/sw/rxe/rxe_qp.c | 4 +- Thanks, for infiniband. Reviewed-by: Leon Romanovsky _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec