summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2017-09-30 08:43:49 -0700
committerJonathan Corbet <corbet@lwn.net>2017-10-07 10:45:14 -0600
commit341e9a323af95ac141b4df41e2697d626da14e3f (patch)
tree298c715375bf9a50b7d1b8172926fea66053e960 /lib
parent078843f75d234123e654b992d97e8ae8a744ba23 (diff)
downloadlinux-341e9a323af95ac141b4df41e2697d626da14e3f.tar.gz
linux-341e9a323af95ac141b4df41e2697d626da14e3f.tar.bz2
linux-341e9a323af95ac141b4df41e2697d626da14e3f.zip
lib/gcd: add kernel-doc notation
Add kernel-doc notation for the gcd() function (so that it can be added to the kernel-api documentation). Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'lib')
-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;