Re: [PATCH v2 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

From: Jeff Epler
Date: Tue Mar 24 2015 - 10:29:41 EST


[for just patch 1/4; I didn't look as closely at the others]
Reviewed-by: Jeff Epler <jepler@xxxxxxxxxxxxxx>

...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/