From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [GIT PULL] iscsi-target merge for v3.1-rc1 Date: Tue, 26 Jul 2011 00:43:35 -0700 Message-ID: <20110726004335.c6f26c5c.akpm@linux-foundation.org> References: <1311462975.31450.356.camel@haakon2.linux-iscsi.org> <20110725163739.5c19b04d.akpm@linux-foundation.org> <20110725165057.9701f16b.akpm@linux-foundation.org> <1311663071.17766.230.camel@haakon2.linux-iscsi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:39205 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142Ab1GZHnb (ORCPT ); Tue, 26 Jul 2011 03:43:31 -0400 In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Linus Torvalds Cc: "Nicholas A. Bellinger" , target-devel , linux-scsi , LKML , Christoph Hellwig , Andy Grover , Hannes Reinecke , Roland Dreier , James Bottomley , Boaz Harrosh , Mike Christie On Tue, 26 Jul 2011 00:09:40 -0700 Linus Torvalds wrote: > Just a simple > > #define DIV_ROUND_UP_ULL(ll,d) \ > ({ unsigned long long _tmp = (ll)+(d)-1; do_div(_tmp, d); _tmp; }) > > looks like it would work and be simpler. Avoid the conditional, do the > same "add 'd-1' thing as the regular ROUND_UP(). > We might end up needing a DIV_ROUND_UP_SECTOR_T because that guy's type/size is Kconfigurable. otoh DIV_ROUND_UP_ULL won't have many callsites - the occasional conversion from UL to ULL then back to UL wouldn't kill us. Unless there be subtle problems with such a conversion.