From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 17 Jun 2013 19:56:57 -0500 Subject: [U-Boot] [PATCH v5 05/14] nand: add Faraday FTNANDC021 NAND controller support In-Reply-To: (from dantesu@gmail.com on Mon Jun 17 19:51:44 2013) References: <1371470824-3228-6-git-send-email-dantesu@gmail.com> <1371514124.9073.7@snotra> Message-ID: <1371517017.9073.19@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/17/2013 07:51:44 PM, Kuo-Jung Su wrote: > 2013/6/18 Scott Wood : > > On 06/17/2013 07:06:55 AM, Kuo-Jung Su wrote: > >> + off = 0; > >> + while (off < len && priv->col < mtd->writesize) { > >> + ftnandc021_pio_wait(priv); > >> + *(uint32_t *)(buf + off) = readl(®s->dr); > > > > > > This looks like illegal type-punning. Use memcpy. > > > > Likewise elsewhere. > > How about put_unaligned() / get_unaligned() ? > It looks more simpler and safer to me. That's fine too. -Scott