From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755590AbdGXPjT (ORCPT ); Mon, 24 Jul 2017 11:39:19 -0400 Received: from merlin.infradead.org ([205.233.59.134]:51102 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754573AbdGXPie (ORCPT ); Mon, 24 Jul 2017 11:38:34 -0400 Message-Id: <20170724153455.770563780@infradead.org> User-Agent: quilt/0.61-1 Date: Mon, 24 Jul 2017 17:16:33 +0200 From: Peter Zijlstra To: torvalds@linux-foundation.org, akpm@linux-foundation.org Cc: dave@stgolabs.net, aksgarg1989@gmail.com, tglx@linutronix.de, mingo@kernel.org, will.deacon@arm.com, joe@perches.com, peterz@infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] lib/int_sqrt: Adjust comments References: <20170724151630.447009076@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=peterz-int_sqrt-opt-3.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Our current int_sqrt() is not rough nor any approximation; it calculates the exact value of: floor(sqrt()). Document this. Signed-off-by: Peter Zijlstra (Intel) --- lib/int_sqrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/lib/int_sqrt.c +++ b/lib/int_sqrt.c @@ -10,10 +10,10 @@ #include /** - * int_sqrt - rough approximation to sqrt + * int_sqrt - computes the integer square root * @x: integer of which to calculate the sqrt * - * A very rough approximation to the sqrt() function. + * Computes: floor(sqrt(x)) */ unsigned long int_sqrt(unsigned long x) {