]> git.baikalelectronics.ru Git - uboot.git/commit
riscv: memcpy: check src and dst before copy
authorRick Chen <rick@andestech.com>
Wed, 4 Jan 2023 01:56:28 +0000 (09:56 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 1 Feb 2023 08:17:45 +0000 (16:17 +0800)
commit3a6d9afca0023d0cec0a55743deb571e02f35600
tree9b29b00382d54a141e2b74369a1f53de1d0affe4
parentd2ad940d151d5fd1968f114ec6f3fd9df531f500
riscv: memcpy: check src and dst before copy

Add src and dst address checking, if they
are the same address, just return and don't
copy data anymore.

Signed-off-by: Rick Chen <rick@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/lib/memcpy.S