Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: gmux
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (16 sloc) 0.291 kB
#include <linux/kernel.h>
#include <linux/gcd.h>
#include <linux/module.h>
/* Greatest common divisor */
unsigned long gcd(unsigned long a, unsigned long b)
{
unsigned long r;
if (a < b)
swap(a, b);
while ((r = a % b) != 0) {
a = b;
b = r;
}
return b;
}
EXPORT_SYMBOL_GPL(gcd);
Jump to Line
Something went wrong with that request. Please try again.