From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/6] IXP: Fix NAND build warning on PDNB3 and SCPU
Date: Mon, 5 Mar 2012 18:35:51 -0600 [thread overview]
Message-ID: <4F555BE7.2020909@freescale.com> (raw)
In-Reply-To: <1330992781-1394-7-git-send-email-marex@denx.de>
On 03/05/2012 06:13 PM, Marek Vasut wrote:
> nand.c: In function ?pdnb3_nand_read_buf?:
> nand.c:107:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> nand.c: In function ?pdnb3_nand_dev_ready?:
> nand.c:124:18: warning: variable ?val? set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Bryan Hundven <bryanhundven@gmail.com>
> Cc: Michael Schwingen <rincewind@discworld.dascon.de>
> ---
> board/prodrive/pdnb3/nand.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/board/prodrive/pdnb3/nand.c b/board/prodrive/pdnb3/nand.c
> index 2efe027..656fafe 100644
> --- a/board/prodrive/pdnb3/nand.c
> +++ b/board/prodrive/pdnb3/nand.c
> @@ -100,11 +100,14 @@ static void pdnb3_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
> for (i = 0; i < len; i++)
> buf[i] = readb(&(pdnb3_ndfc->data));
> } else {
> - ulong *ptr = (ulong *)buf;
> + uint32_t data;
> int count = len >> 2;
>
> - for (i = 0; i < count; i++)
> - *ptr++ = readl(&(pdnb3_ndfc->data));
> + for (i = 0; i < count; i++) {
> + data = readl(&pdnb3_ndfc->data);
> + memcpy(buf, &data, 4);
> + buf += 4;
> + }
> }
> }
>
Any reason this isn't in drivers/mtd/nand?
-Scott
next prev parent reply other threads:[~2012-03-06 0:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 0:12 [U-Boot] [PATCH 0/6] IXP: Make IXP compile with arm-linux-gnueabi- and fix it Marek Vasut
2012-03-06 0:12 ` [U-Boot] [PATCH 1/6] Examples: Properly append LDFLAGS to LD command Marek Vasut
2012-03-06 0:12 ` [U-Boot] [PATCH 2/6] IXP: Make IXP buildable with arm-linux- toolchains Marek Vasut
2012-03-06 0:12 ` [U-Boot] [PATCH 3/6] IXP: Fix missing MACH_TYPE_{ACTUX?, PNB3, DVLHOST} Marek Vasut
2012-03-06 0:12 ` [U-Boot] [PATCH 4/6] IXP: Squash warnings in IXP NPE Marek Vasut
2012-03-06 0:13 ` [U-Boot] [PATCH 5/6] IXP: Move PDNB3 and SCPU from Makefile to boards.cfg Marek Vasut
2012-03-06 0:13 ` [U-Boot] [PATCH 6/6] IXP: Fix NAND build warning on PDNB3 and SCPU Marek Vasut
2012-03-06 0:35 ` Scott Wood [this message]
2012-03-06 0:37 ` Marek Vasut
2012-03-06 0:18 ` [U-Boot] [PATCH 0/6] IXP: Make IXP compile with arm-linux-gnueabi- and fix it Marek Vasut
2012-03-06 7:45 ` Michael Schwingen
2012-03-06 8:19 ` Marek Vasut
2012-03-06 10:16 ` Michael Schwingen
2012-03-06 0:21 ` Bryan Hundven
2012-03-06 11:05 ` [U-Boot] [PATCH 0/7 V2] " Marek Vasut
2012-03-06 11:05 ` [U-Boot] [PATCH 1/7 RESEND] Examples: Properly append LDFLAGS to LD command Marek Vasut
2012-03-06 11:05 ` [U-Boot] [PATCH 2/7 RESEND] IXP: Make IXP buildable with arm-linux- toolchains Marek Vasut
2012-03-06 11:05 ` [U-Boot] [PATCH 3/7 RESEND] IXP: Fix missing MACH_TYPE_{ACTUX?, PNB3, DVLHOST} Marek Vasut
2012-03-06 11:05 ` [U-Boot] [PATCH 4/7 RESEND] IXP: Squash warnings in IXP NPE Marek Vasut
2012-03-06 11:05 ` [U-Boot] [PATCH 5/7 RESEND] IXP: Move PDNB3 and SCPU from Makefile to boards.cfg Marek Vasut
2012-03-06 11:05 ` [U-Boot] [PATCH 6/7 V2] IXP: Fix NAND build warning on PDNB3 and SCPU Marek Vasut
2012-03-06 11:05 ` [U-Boot] [PATCH 7/7] IXP: Fix GPIO_INT_ACT_LOW_SET() Marek Vasut
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=4F555BE7.2020909@freescale.com \
--to=scottwood@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