Revision 250541fca717a5c9b0d3710e737b2ca32ebb6fbc authored by Linus Torvalds on 15 April 2010, 01:46:03 UTC, committed by Linus Torvalds on 15 April 2010, 01:46:03 UTC
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  SELinux: Reduce max avtab size to avoid page allocation failures
2 parent s 96e35b4 + 6c9ff10
Raw File
gcd.c
#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);
back to top