Revision e43b3cec711a61edf047adf6204d542f3a659ef8 authored by H. Peter Anvin on 14 January 2013, 04:56:41 UTC, committed by H. Peter Anvin on 14 January 2013, 04:58:57 UTC
early_pci_allowed() and read_pci_config_16() are only available if
CONFIG_PCI is defined.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent ab3cd86
Raw File
lcm.c
#include <linux/kernel.h>
#include <linux/gcd.h>
#include <linux/export.h>
#include <linux/lcm.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);
back to top