From: Kim Phillips <kim.phillips@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] declaring and initializing variables
Date: Mon, 7 Oct 2013 17:03:47 -0500 [thread overview]
Message-ID: <20131007170347.bfc63719bf95e28d508c70ee@freescale.com> (raw)
In-Reply-To: <524A1191.90908@freescale.com>
On Mon, 30 Sep 2013 17:04:33 -0700
York Sun <yorksun@freescale.com> wrote:
> Kim, et al.,
>
> I know I have asked this before. Pardon me as I don't consider myself a
> savy programmer.
>
> I am cleaning up the DDR driver for mpc83xx, mpc85xx and mpc86xx. The
> question is the accetable formats of declaring and initializing variable
> at the same time. The variables are the ccsr register pointers. I have
> two formats here
>
> struct ccsr_ddr __iomem *ddr = (void *) CONFIG_FOO_ADDR;
> struct ccsr_ddr __iomem *ddr =
> (struct ccsr_ddr __iomem *) CONFIG_FOO_ADDR;
>
> You have told me the second format is preferred. I have been using this
> format since. But in practice, the second format is often too long and I
> have to wrap to next line. It's not a problem for new code. As I am
> trying to cleanup the existing code, I would have to make more changes.
> So I am back to this question. Is the first format (using void *)
> accetable in long term?
you're not running sparse, are you? :)
Use 'make C=1' or 'MAKEALL -C' when building u-boot.
Kim
next prev parent reply other threads:[~2013-10-07 22:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 0:04 [U-Boot] declaring and initializing variables York Sun
2013-10-01 1:17 ` Timur Tabi
2013-10-07 22:03 ` Kim Phillips [this message]
2013-10-14 19:05 ` York Sun
2013-10-15 19:18 ` Kim Phillips
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=20131007170347.bfc63719bf95e28d508c70ee@freescale.com \
--to=kim.phillips@freescale.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