diff options
author | Peter Zijlstra <peterz@infradead.org> | 2017-11-17 15:28:12 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-17 16:10:01 -0800 |
commit | e813a614007e3a8a7b53d976e86d9a20f21f81ad (patch) | |
tree | a9e47515bf36699de4cf802a281b161525aa633e /lib | |
parent | f8ae107eef209bff29a5816bc1aad40d5cd69a80 (diff) | |
download | linux-e813a614007e3a8a7b53d976e86d9a20f21f81ad.tar.gz linux-e813a614007e3a8a7b53d976e86d9a20f21f81ad.tar.bz2 linux-e813a614007e3a8a7b53d976e86d9a20f21f81ad.zip |
lib/int_sqrt: adjust comments
Our current int_sqrt() is not rough nor any approximation; it calculates
the exact value of: floor(sqrt()). Document this.
Link: http://lkml.kernel.org/r/20171020164645.001652117@infradead.org
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Anshul Garg <aksgarg1989@gmail.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: David Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Joe Perches <joe@perches.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Michael Davidson <md@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/int_sqrt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c index 67bb300b5b46..e2d329099bf7 100644 --- a/lib/int_sqrt.c +++ b/lib/int_sqrt.c @@ -11,10 +11,10 @@ #include <linux/bitops.h> /** - * 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) { |