summaryrefslogtreecommitdiff
path: root/lib/gcd.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-29 09:11:24 +0300
committerIngo Molnar <mingo@kernel.org>2017-11-29 09:11:24 +0300
commit4fc31ba13d052c2933bf91095c063cf9a39effd0 (patch)
treebeabb73c2fe245e6541126732895da62e55bc8ee /lib/gcd.c
parent0e18dd12064e07519f7cbff4149ca7fff620cbed (diff)
parentb29c6ef7bb1257853c1e31616d84f55e561cf631 (diff)
downloadlinux-4fc31ba13d052c2933bf91095c063cf9a39effd0.tar.xz
Merge branch 'linus' into perf/urgent, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/gcd.c')
-rw-r--r--lib/gcd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gcd.c b/lib/gcd.c
index 135ee6407a5e..227dea924425 100644
--- a/lib/gcd.c
+++ b/lib/gcd.c
@@ -13,6 +13,12 @@
#if !defined(CONFIG_CPU_NO_EFFICIENT_FFS) && !defined(CPU_NO_EFFICIENT_FFS)
/* If __ffs is available, the even/odd algorithm benchmarks slower. */
+
+/**
+ * gcd - calculate and return the greatest common divisor of 2 unsigned longs
+ * @a: first value
+ * @b: second value
+ */
unsigned long gcd(unsigned long a, unsigned long b)
{
unsigned long r = a | b;