The patch titled lib: add lib/gcd.c has been added to the -mm tree. Its filename is lib-add-lib-gcdc.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: lib: add lib/gcd.c From: Florian Fainelli <florian@xxxxxxxxxxx> This patch adds lib/gcd.c which contains a greatest common divider implementation taken from sound/core/pcm_timer.c Signed-off-by: Florian Fainelli <florian@xxxxxxxxxxx> Cc: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx> Cc: Takashi Iwai <tiwai@xxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Simon Horman <horms@xxxxxxxxxxxx> Cc: Julius Volz <juliusv@xxxxxxxxxx> Cc: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/gcd.h | 8 ++++++++ lib/Kconfig | 3 +++ lib/Makefile | 1 + lib/gcd.c | 20 ++++++++++++++++++++ 4 files changed, 32 insertions(+) diff -puN /dev/null include/linux/gcd.h --- /dev/null +++ a/include/linux/gcd.h @@ -0,0 +1,8 @@ +#ifndef _GCD_H +#define _GCD_H + +#include <linux/compiler.h> + +unsigned long gcd(unsigned long a, unsigned long b) __attribute_const__; + +#endif /* _GCD_H */ diff -puN lib/Kconfig~lib-add-lib-gcdc lib/Kconfig --- a/lib/Kconfig~lib-add-lib-gcdc +++ a/lib/Kconfig @@ -10,6 +10,9 @@ menu "Library routines" config BITREVERSE tristate +config GCD + bool + config GENERIC_FIND_FIRST_BIT bool diff -puN lib/Makefile~lib-add-lib-gcdc lib/Makefile --- a/lib/Makefile~lib-add-lib-gcdc +++ a/lib/Makefile @@ -57,6 +57,7 @@ obj-$(CONFIG_CRC_ITU_T) += crc-itu-t.o obj-$(CONFIG_CRC32) += crc32.o obj-$(CONFIG_CRC7) += crc7.o obj-$(CONFIG_LIBCRC32C) += libcrc32c.o +obj-$(CONFIG_GCD) += gcd.o obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/ diff -puN /dev/null lib/gcd.c --- /dev/null +++ a/lib/gcd.c @@ -0,0 +1,20 @@ +#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) { + r = a; + a = b; + b = r; + } + while ((r = a % b) != 0) { + a = b; + b = r; + } + return b; +} +EXPORT_SYMBOL_GPL(gcd); _ Patches currently in -mm which might be from florian@xxxxxxxxxxx are linux-next.patch lib-add-lib-gcdc.patch sound-core-pcm_timerc-use-lib-gcdc.patch net-netfilter-ipvs-ip_vs_wrrc-use-lib-gcdc.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html