Revision 829f51dbd825256197fb2a89705d42ad83f958ef authored by Linus Torvalds on 02 June 2012, 02:56:23 UTC, committed by Linus Torvalds on 02 June 2012, 02:56:23 UTC
Merge fixups for the mac NLS tables from Andrew.

* emailed from Andrew Morton, and one cleanup by me:
  nls: fix (and rename) mac NLS table files and config options
  fs/nls/Makefile: remove bogus CONFIG_ assignments
2 parent s 804ce98 + 8b8c0da
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