Re: [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp.

From: Mike Frysinger
Date: Sat Nov 14 2009 - 21:53:11 EST


On Mon, Nov 2, 2009 at 16:04, Thiago Farina wrote:
> Since the kernel api already has the macro "max",
> just use it instead of declaring another one.
>
> --- a/arch/blackfin/mach-bf537/boards/stamp.c
> +++ b/arch/blackfin/mach-bf537/boards/stamp.c
> @@ -385,10 +385,9 @@ static struct platform_nand_data bfin_plat_nand_data = {
> Â Â Â Â},
> Â};
>
> -#define MAX(x, y) (x > y ? x : y)
> Âstatic struct resource bfin_plat_nand_resources = {
> Â Â Â Â.start = 0x20212000,
> -    .end  = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
> +    .end  = 0x20212000 + (1 << max(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),

sorry, going to have to reject this. the common min/max defines are
not usable in this context. this patch produces a build failure:
CC arch/blackfin/mach-bf537/boards/stamp.o
arch/blackfin/mach-bf537/boards/stamp.c:430: error: braced-group
within expression allowed only inside a function
make[1]: *** [arch/blackfin/mach-bf537/boards/stamp.o] Error 1
-mike
--
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/