Searched hist:"9 b56942f7d2f67e620662cfeb4269a9a938d55da" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/drivers/mtd/onenand/ |
| H A D | onenand_base.c | 9b56942f7d2f67e620662cfeb4269a9a938d55da Thu Dec 26 00:01:24 UTC 2013 Marek Vasut <marex@denx.de> mtd: onenand: Fix unaligned access
Fix unaligned access in OneNAND core. The problem is that the ffchars[] array is an array of "unsigned char", but in onenand_write_ops_nolock() can be passed to the memcpy_16() function. The memcpy_16() function will treat the buffer as an array of "unsigned short", thus triggering unaligned access if the compiler decided ffchars[] to be not aligned.
I managed to trigger the problem with regular ELDK 5.4 GCC compiler.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Scott Wood <scottwood@freescale.com> Cc: Tom Rini <trini@ti.com>
|