Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761352AbbKUCSW (ORCPT ); Fri, 20 Nov 2015 21:18:22 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:38304 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752561AbbKUCSU (ORCPT ); Fri, 20 Nov 2015 21:18:20 -0500 Subject: Re: [PATCH] IB/iser: use sector_div instead of do_div To: Arnd Bergmann , Or Gerlitz , Sagi Grimberg References: <5922990.8IJpyksX8K@wuerfel> Cc: nico@fluxnic.net, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Roi Dayan , Doug Ledford , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org From: Sagi Grimberg Message-ID: <564FD463.2020205@dev.mellanox.co.il> Date: Sat, 21 Nov 2015 04:18:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5922990.8IJpyksX8K@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 836 Lines: 21 > do_div is the wrong way to divide a sector_t, as it is less > efficient when sector_t is 32-bit wide. With the upcoming > do_div optimizations, the kernel starts warning about this: > > drivers/infiniband/ulp/iser/iser_verbs.c:1296:4: note: in expansion of macro 'do_div' > include/asm-generic/div64.h:224:22: warning: passing argument 1 of '__div64_32' from incompatible pointer type > > This changes the code to use sector_div instead, which always > produces optimal code. > > Signed-off-by: Arnd Bergmann Thanks Arnd, Reviewed-by: Sagi Grimberg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/