Release 4.18 lib/lcm.c
#include <linux/compiler.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 / gcd(a, b)) * b;
else
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin K. Petersen | 33 | 86.84% | 1 | 33.33% |
Rasmus Villemoes | 5 | 13.16% | 2 | 66.67% |
Total | 38 | 100.00% | 3 | 100.00% |
EXPORT_SYMBOL_GPL(lcm);
unsigned long lcm_not_zero(unsigned long a, unsigned long b)
{
unsigned long l = lcm(a, b);
if (l)
return l;
return (b ? : a);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Mike Snitzer | 40 | 100.00% | 1 | 100.00% |
Total | 40 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL_GPL(lcm_not_zero);
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin K. Petersen | 46 | 45.54% | 1 | 14.29% |
Mike Snitzer | 45 | 44.55% | 1 | 14.29% |
Rasmus Villemoes | 6 | 5.94% | 3 | 42.86% |
H Hartley Sweeten | 3 | 2.97% | 1 | 14.29% |
Paul Gortmaker | 1 | 0.99% | 1 | 14.29% |
Total | 101 | 100.00% | 7 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.