https://github.com/torvalds/linux
Revision 85d45adef06caa988506686527a5fedf856dc550 authored by Linus Torvalds on 21 June 2011, 03:11:34 UTC, committed by Linus Torvalds on 21 June 2011, 03:11:34 UTC
* 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm:
  msm: timer: Fix DGT rate on 8960 and 8660
  msm: timer: compensate for timer shift in msm_read_timer_count
  msm: timer: Fix SMP build error
2 parent s eda0841 + fdb9c3c
Raw File
Tip revision: 85d45adef06caa988506686527a5fedf856dc550 authored by Linus Torvalds on 21 June 2011, 03:11:34 UTC
Merge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm
Tip revision: 85d45ad
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