[U-Boot] [Patch V7 2/4] spi: fsl_qspi: Fix qspi_op_rdid memcpy issue

york sun york.sun at nxp.com
Wed Jan 27 18:15:38 CET 2016


On 01/25/2016 11:15 PM, Gong Qianyu wrote:
> From: Gong Qianyu <Qianyu.Gong at 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 at 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



More information about the U-Boot mailing list