Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: galaxys-port
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 16 lines (13 sloc) 0.265 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <linux/kernel.h>
#include <linux/gcd.h>
#include <linux/module.h>

/* Lowest common multiple */
unsigned long lcm(unsigned long a, unsigned long b)
{
if (a && b)
return (a * b) / gcd(a, b);
else if (b)
return b;

return a;
}
EXPORT_SYMBOL_GPL(lcm);
Something went wrong with that request. Please try again.