[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A27D85D.6040504@ru.mvista.com>
Date: Thu, 04 Jun 2009 18:21:17 +0400
From: Sergei Shtylyov <sshtylyov@...mvista.com>
To: Florian Fainelli <florian@...nwrt.org>
Cc: Linux-MIPS <linux-mips@...ux-mips.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Takashi Iwai <tiwai@...e.de>,
Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [PATCH 1/8] add lib/gcd.c
Hello.
Florian Fainelli wrote:
> 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@...nwrt.org>
[...]
> diff --git a/lib/gcd.c b/lib/gcd.c
> new file mode 100644
> index 0000000..fbf81a8
> --- /dev/null
> +++ b/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;
Fix indetnation please.
> + }
> + while ((r = a % b) != 0) {
> + a = b;
> + b = r;
> + }
> + return b;
> +}
> +EXPORT_SYMBOL(gcd);
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists