* [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp.
@ 2009-11-02 21:04 Thiago Farina
2009-11-05 17:01 ` Thiago Farina
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Thiago Farina @ 2009-11-02 21:04 UTC (permalink / raw)
To: trivial
Cc: vapier, cooloney, michael.hennerich, barry.song, yi.li,
uclinux-dist-devel, linux-kernel, Thiago Farina
Since the kernel api already has the macro "max",
just use it instead of declaring another one.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
arch/blackfin/mach-bf537/boards/stamp.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index c46baa5..c76da37 100644
--- 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)),
.flags = IORESOURCE_IO,
};
--
1.6.5.1.61.ge79999
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp.
2009-11-02 21:04 [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp Thiago Farina
@ 2009-11-05 17:01 ` Thiago Farina
2009-11-06 3:17 ` [Uclinux-dist-devel] [PATCH] blackfin/trivial: remove duplicatedMAX " Zhang, Sonic
2009-11-15 2:52 ` [PATCH] blackfin/trivial: remove duplicated MAX " Mike Frysinger
2 siblings, 0 replies; 6+ messages in thread
From: Thiago Farina @ 2009-11-05 17:01 UTC (permalink / raw)
To: trivial
Cc: jkosina, vapier, cooloney, michael.hennerich, barry.song, yi.li,
uclinux-dist-devel, linux-kernel, Thiago Farina
Ping?
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Uclinux-dist-devel] [PATCH] blackfin/trivial: remove duplicatedMAX macro from stamp.
2009-11-02 21:04 [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp Thiago Farina
2009-11-05 17:01 ` Thiago Farina
@ 2009-11-06 3:17 ` Zhang, Sonic
2009-11-08 13:38 ` Thiago Farina
2009-11-15 2:52 ` [PATCH] blackfin/trivial: remove duplicated MAX " Mike Frysinger
2 siblings, 1 reply; 6+ messages in thread
From: Zhang, Sonic @ 2009-11-06 3:17 UTC (permalink / raw)
To: Thiago Farina, trivial
Cc: vapier, Hennerich, Michael, linux-kernel, Song, Barry,
uclinux-dist-devel
Acked-by: Sonic Zhang<sonic.zhang@analog.com>
-----Original Message-----
From: uclinux-dist-devel-bounces@blackfin.uclinux.org
[mailto:uclinux-dist-devel-bounces@blackfin.uclinux.org] On Behalf Of
Thiago Farina
Sent: Tuesday, November 03, 2009 5:05 AM
To: trivial@kernel.org
Cc: vapier@gentoo.org; Hennerich, Michael; linux-kernel@vger.kernel.org;
Song, Barry; uclinux-dist-devel@blackfin.uclinux.org; Thiago Farina
Subject: [Uclinux-dist-devel] [PATCH] blackfin/trivial: remove
duplicatedMAX macro from stamp.
Since the kernel api already has the macro "max", just use it instead of
declaring another one.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
arch/blackfin/mach-bf537/boards/stamp.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c
b/arch/blackfin/mach-bf537/boards/stamp.c
index c46baa5..c76da37 100644
--- 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)),
.flags = IORESOURCE_IO,
};
--
1.6.5.1.61.ge79999
_______________________________________________
Uclinux-dist-devel mailing list
Uclinux-dist-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Uclinux-dist-devel] [PATCH] blackfin/trivial: remove duplicatedMAX macro from stamp.
2009-11-06 3:17 ` [Uclinux-dist-devel] [PATCH] blackfin/trivial: remove duplicatedMAX " Zhang, Sonic
@ 2009-11-08 13:38 ` Thiago Farina
2009-11-08 13:57 ` Mike Frysinger
0 siblings, 1 reply; 6+ messages in thread
From: Thiago Farina @ 2009-11-08 13:38 UTC (permalink / raw)
To: Zhang, Sonic
Cc: trivial, vapier, Hennerich, Michael, linux-kernel, Song, Barry,
uclinux-dist-devel
Hi Sonic,
On Fri, Nov 6, 2009 at 1:17 AM, Zhang, Sonic <Sonic.Zhang@analog.com> wrote:
> Acked-by: Sonic Zhang<sonic.zhang@analog.com>
Could you apply this to blackfin tree?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Uclinux-dist-devel] [PATCH] blackfin/trivial: remove duplicatedMAX macro from stamp.
2009-11-08 13:38 ` Thiago Farina
@ 2009-11-08 13:57 ` Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-11-08 13:57 UTC (permalink / raw)
To: Thiago Farina
Cc: Zhang, Sonic, trivial, Hennerich, Michael, linux-kernel, Song,
Barry, uclinux-dist-devel
On Sun, Nov 8, 2009 at 08:38, Thiago Farina wrote:
> On Fri, Nov 6, 2009 at 1:17 AM, Zhang, Sonic wrote:
>> Acked-by: Sonic Zhang<sonic.zhang@analog.com>
>
> Could you apply this to blackfin tree?
he has merged it into the svn tree we have. i havent picked it up in
the Blackfin git tree yet as ive been busy with some other projects.
i should be able to get it in before 2.6.32 final though.
-mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp.
2009-11-02 21:04 [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp Thiago Farina
2009-11-05 17:01 ` Thiago Farina
2009-11-06 3:17 ` [Uclinux-dist-devel] [PATCH] blackfin/trivial: remove duplicatedMAX " Zhang, Sonic
@ 2009-11-15 2:52 ` Mike Frysinger
2 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-11-15 2:52 UTC (permalink / raw)
To: Thiago Farina
Cc: trivial, cooloney, michael.hennerich, barry.song, yi.li,
uclinux-dist-devel, linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-11-15 2:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-02 21:04 [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp Thiago Farina
2009-11-05 17:01 ` Thiago Farina
2009-11-06 3:17 ` [Uclinux-dist-devel] [PATCH] blackfin/trivial: remove duplicatedMAX " Zhang, Sonic
2009-11-08 13:38 ` Thiago Farina
2009-11-08 13:57 ` Mike Frysinger
2009-11-15 2:52 ` [PATCH] blackfin/trivial: remove duplicated MAX " Mike Frysinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.