public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH-OMAP3] OMAP3: Plain numbers don't need parens
Date: Tue, 04 Nov 2008 20:26:13 +0100	[thread overview]
Message-ID: <4910A1D5.2070306@googlemail.com> (raw)
In-Reply-To: <20081104191234.5A713832E405@gemini.denx.de>

Wolfgang Denk wrote:
> Dear Dirk,
> 
> In message <49108377.0305560a.52c1.39ea@mx.google.com> you wrote:
> 
>>Use a consistent style. Plain numbers don't need parens. Proposed by Wolfgang Denk.
>>
>>Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
> 
> ...
> 
> But...
> 
> 
>> /* GPMC CS3/cs4/cs6 not avaliable */
>>-#define GPMC_BASE		(OMAP34XX_GPMC_BASE)
>>+#define GPMC_BASE		OMAP34XX_GPMC_BASE
> 
> 
> This is NOT a plain number.

OMAP34XX_GPMC_BASE is. Trust me, I checked it before doing this change ...

> If I decide to use something like
> 
> #define	OMAP34XX_GPMC_BASE	FOO + BAR
> 
> you might comment that such a #define is dangerous in itself, but why
> not protet against it? with a number we are sure we don't need parens,
> but with a macro we'd should rather play safe.

... so we do play safe here. Maybe you noticed that I didn't change 
other places where the parens are needed as you correctly explained.

Dirk

  reply	other threads:[~2008-11-04 19:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 17:16 [U-Boot] [PATCH-OMAP3] OMAP3: Plain numbers don't need parens dirk.behme at googlemail.com
2008-11-04 19:12 ` Wolfgang Denk
2008-11-04 19:26   ` Dirk Behme [this message]
2008-11-04 19:28   ` Magnus Lilja
2008-11-04 21:08     ` Wolfgang Denk
2008-11-04 21:42   ` Graeme Russ
2008-11-20 23:47 ` Jean-Christophe PLAGNIOL-VILLARD

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=4910A1D5.2070306@googlemail.com \
    --to=dirk.behme@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /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