mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: Thiago Farina <tfransosi@gmail.com>
Cc: trivial@kernel.org, cooloney@kernel.org,
	michael.hennerich@analog.com, barry.song@analog.com,
	yi.li@analog.com, uclinux-dist-devel@blackfin.uclinux.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blackfin/trivial: remove duplicated MAX macro from stamp.
Date: Sat, 14 Nov 2009 21:52:36 -0500	[thread overview]
Message-ID: <8bd0f97a0911141852x33dedba8g7d3c3b134ff654b@mail.gmail.com> (raw)
In-Reply-To: <1257195888-6122-1-git-send-email-tfransosi@gmail.com>

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

      parent reply	other threads:[~2009-11-15  2:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 21:04 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 ` Mike Frysinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8bd0f97a0911141852x33dedba8g7d3c3b134ff654b@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=barry.song@analog.com \
    --cc=cooloney@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=tfransosi@gmail.com \
    --cc=trivial@kernel.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=yi.li@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®