From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579AbbCXO3h (ORCPT ); Tue, 24 Mar 2015 10:29:37 -0400 Received: from zeroeth.unpythonic.net ([162.243.242.154]:55380 "EHLO zeroeth.unpythonic.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752262AbbCXO3f (ORCPT ); Tue, 24 Mar 2015 10:29:35 -0400 Date: Tue, 24 Mar 2015 09:29:27 -0500 From: Jeff Epler To: Javi Merino Cc: akpm@linux-foundation.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, emil.l.velikov@gmail.com, daniel@ffwll.ch, Jani Nikula , David Airlie , Guenter Roeck Subject: Re: [PATCH v2 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL Message-ID: <20150324142926.GF17049@unpythonic.net> References: <1427205825-5444-1-git-send-email-javi.merino@arm.com> <1427205825-5444-2-git-send-email-javi.merino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427205825-5444-2-git-send-email-javi.merino@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [for just patch 1/4; I didn't look as closely at the others] Reviewed-by: Jeff Epler ...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