Commit e813a614 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Linus Torvalds

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: default avatarPeter Zijlstra (Intel) <>
Acked-by: default avatarLinus Torvalds <>
Cc: Anshul Garg <>
Cc: Davidlohr Bueso <>
Cc: David Miller <>
Cc: Ingo Molnar <>
Cc: Joe Perches <>
Cc: Kees Cook <>
Cc: Matthew Wilcox <>
Cc: Michael Davidson <>
Cc: Thomas Gleixner <>
Cc: Will Deacon <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent f8ae107e
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment