Re: [PATCH -v3 1/2] x86, setup: reorgize the early_console_setup

From: Cyrill Gorcunov
Date: Mon Aug 02 2010 - 13:43:44 EST


On Mon, Aug 02, 2010 at 02:17:31AM -0700, Yinghai Lu wrote:
...
> Index: linux-2.6/arch/x86/boot/printf.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/boot/printf.c
> +++ linux-2.6/arch/x86/boot/printf.c
> @@ -34,7 +34,7 @@ static int skip_atoi(const char **s)
> #define SMALL 32 /* Must be 32 == 0x20 */
> #define SPECIAL 64 /* 0x */
>
> -#define do_div(n,base) ({ \
> +#define __do_div(n, base) ({ \
> int __res; \
> __res = ((unsigned long) n) % (unsigned) base; \
> n = ((unsigned long) n) / (unsigned) base; \
> @@ -83,7 +83,7 @@ static char *number(char *str, long num,
> tmp[i++] = '0';
> else
> while (num != 0)
> - tmp[i++] = (digits[do_div(num, base)] | locase);
> + tmp[i++] = (digits[__do_div(num, base)] | locase);

Yinghai, what was wrong with the origin do_div? After inclusion it as "printf.c"
in another *.c do_div gets clashed?

-- Cyrill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/