From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 8 Jul 2013 18:59:23 -0500 Subject: [U-Boot] [PATCH v6 03/12] nand: add Faraday FTNANDC021 NAND controller support In-Reply-To: <1372909244-25211-4-git-send-email-dantesu@gmail.com> (from dantesu@gmail.com on Wed Jul 3 22:40:35 2013) Message-ID: <1373327963.8183.186@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 07/03/2013 10:40:35 PM, Kuo-Jung Su wrote: > +#ifndef __ARMEB__ > + put_unaligned_le32(readl(®s->dr), buf + off); > +#else > + put_unaligned_be32(readl(®s->dr), buf + off); > +#endif Can't you just use plain put_unaligned()? Be sure to cast buf + off to a 32-bit pointer. Also, when you *do* need to have an if/else, use positive logic -- ifdef rather than ifndef, with the if/else swapped. -Scott