[U-Boot] [PATCH v6 03/12] nand: add Faraday FTNANDC021 NAND controller support

Scott Wood
2013-07-08T23:59:23Z

On 07/03/2013 10:40:35 PM, Kuo-Jung Su wrote:
> +#ifndef __ARMEB__
> + put_unaligned_le32(readl(&regs->dr), buf + off);
> +#else
> + put_unaligned_be32(readl(&regs->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