lkml.org 
[lkml]   [2015]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL
[for just patch 1/4; I didn't look as closely at the others]
Reviewed-by: Jeff Epler <jepler@unpythonic.net>

...with one half of a caveat (rounded up?): Like most or all of the
originals, and like DIV_ROUND_CLOSEST just above it in kernel.h, the new
code gives an incorrect answer if the temporary overflows at
+ unsigned long long _tmp = (x) + (__d) / 2;

As a doc improvement a remark could be added to a number of these
functions, but there's little reason for that to be part of this series.

Jeff


\
 
 \ /
  Last update: 2015-03-24 15:41    [W:0.043 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site