lkml.org 
[lkml]   [2011]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [GIT PULL] iscsi-target merge for v3.1-rc1
From
On Tue, Jul 26, 2011 at 1:08 PM, Olivier Galibert <galibert@pobox.com> wrote:
> On Tue, Jul 26, 2011 at 12:09:40AM -0700, Linus Torvalds wrote:
>> And it just looks unnecessarily complicated. 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().
>>
>> Untested. And not much thinking involved.
>
> Overflow risk?  Of course DIV_ROUND_UP has the same issue, and looks
> slight easier to trigger, maybe.

Can we please make DIV_ROUND_UP to demultiplex based on argument type inside?
--
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/

\
 
 \ /
  Last update: 2011-07-26 12:17    [W:0.065 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site