
27 Jan
2016
27 Jan
'16
6:15 p.m.
On 01/25/2016 11:15 PM, Gong Qianyu wrote:
From: Gong Qianyu Qianyu.Gong@freescale.com
In current driver everytime we memcpy 4 bytes to the dest memory regardless of the remaining length. This patch adds checking the remaining length before memcpy. If the length is shorter than 4 bytes, memcpy the actual length of data to the dest memory.
Signed-off-by: Gong Qianyu Qianyu.Gong@freescale.com
V7:
- Fix type of "size" and so "size -= 4" is also fixed.
- Not use min() to avoid a compile warning of type cast.
V6:
- Use min() to simplify code.
V2-V5:
- No change.
drivers/spi/fsl_qspi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Applied to u-boot-fsl-qoriq master. Awaiting upstream.
Thanks.
York