mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + lib-int_sqrt-adjust-comments.patch added to -mm tree
@ 2017-10-20 22:18 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-10-20 22:18 UTC (permalink / raw)
  To: peterz, aksgarg1989, davem, dave, joe, keescook, mawilcox, md,
	mingo, tglx, torvalds, will.deacon, mm-commits


The patch titled
     Subject: lib/int_sqrt: adjust comments
has been added to the -mm tree.  Its filename is
     lib-int_sqrt-adjust-comments.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/lib-int_sqrt-adjust-comments.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/lib-int_sqrt-adjust-comments.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Peter Zijlstra <peterz@infradead.org>
Subject: 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>
---

 lib/int_sqrt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN lib/int_sqrt.c~lib-int_sqrt-adjust-comments lib/int_sqrt.c
--- a/lib/int_sqrt.c~lib-int_sqrt-adjust-comments
+++ a/lib/int_sqrt.c
@@ -10,10 +10,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)
 {
_

Patches currently in -mm which might be from peterz@infradead.org are

lib-int_sqrt-optimize-small-argument.patch
lib-int_sqrt-optimize-initial-value-compute.patch
lib-int_sqrt-adjust-comments.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-20 22:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-20 22:18 + lib-int_sqrt-adjust-comments.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).