projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8ae107
)
lib/int_sqrt: adjust comments
author
Peter Zijlstra
<
[email protected]
>
Fri, 17 Nov 2017 23:28:12 +0000
(15:28 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 18 Nov 2017 00:10:01 +0000
(16:10 -0800)
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/
[email protected]
Signed-off-by: Peter Zijlstra (Intel) <
[email protected]
>
Acked-by: Linus Torvalds <
[email protected]
>
Cc: Anshul Garg <
[email protected]
>
Cc: Davidlohr Bueso <
[email protected]
>
Cc: David Miller <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Joe Perches <
[email protected]
>
Cc: Kees Cook <
[email protected]
>
Cc: Matthew Wilcox <
[email protected]
>
Cc: Michael Davidson <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Cc: Will Deacon <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
lib/int_sqrt.c
patch
|
blob
|
history
diff --git
a/lib/int_sqrt.c
b/lib/int_sqrt.c
index 67bb300b5b46735995658d0b5e355aee79b16183..e2d329099bf7483d2f09f48ade59e834cd6b7555 100644
(file)
--- a/
lib/int_sqrt.c
+++ b/
lib/int_sqrt.c
@@
-11,10
+11,10
@@
#include <linux/bitops.h>
/**
- * int_sqrt -
rough approximation to sqr
t
+ * int_sqrt -
computes the integer square roo
t
* @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)
{