From: Grant Erickson <gerickson@nuovations.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH v2] PPC4xx: Simplified post_word_{load, store}
Date: Wed, 21 May 2008 13:25:50 -0700 [thread overview]
Message-ID: <C459D35E.F53C%gerickson@nuovations.com> (raw)
In-Reply-To: <20080521201723.1C8D2247F5@gemini.denx.de>
On 5/21/08 1:17 PM, Wolfgang Denk wrote:
> In message <1211398998-30954-1-git-send-email-gerickson@nuovations.com> you
> wrote:
>> This patch simplifies post_word_{load,store} by using the preprocessor
>> to eliminate redundant, copy-and-pasted code.
> ...
>
>> +#if defined(CFG_POST_WORD_ADDR)
>> +# define _POST_ADDR (CFG_OCM_DATA_ADDR + CFG_POST_WORD_ADDR)
>
> Please make this
>
> # define _POST_ADDR ((CFG_OCM_DATA_ADDR) + (CFG_POST_WORD_ADDR))
>
> This *is* important. Assume
>
> #define CFG_OCM_DATA_ADDR 8 | 1
> #define CFG_POST_WORD_ADDR 16 | 3
>
> Then ((CFG_OCM_DATA_ADDR) + (CFG_POST_WORD_ADDR)) gives 28 as
> intended, but (CFG_OCM_DATA_ADDR + CFG_POST_WORD_ADDR) gives 27.
Agreed and I will make the change; however, were that the case, I would tend
to favor the approach that the responsibility is on the definer of '8 | 1'
and '16 | 3' to wrap those in parens. Thankfully, parens are a free
resource.
Regards,
Grant
next prev parent reply other threads:[~2008-05-21 20:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 18:24 [U-Boot-Users] [PATCH] PPC4xx: Simplified post_word_{load,store} Grant Erickson
2008-05-21 19:29 ` [U-Boot-Users] [PATCH] PPC4xx: Simplified post_word_{load, store} Wolfgang Denk
2008-05-21 19:43 ` [U-Boot-Users] [PATCH v2] " Grant Erickson
2008-05-21 20:17 ` Wolfgang Denk
2008-05-21 20:25 ` Grant Erickson [this message]
2008-05-21 20:28 ` [U-Boot-Users] [PATCH v3] " Grant Erickson
2008-06-03 18:34 ` Stefan Roese
2008-06-04 22:06 ` Wolfgang Denk
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=C459D35E.F53C%gerickson@nuovations.com \
--to=gerickson@nuovations.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 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.