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)
commit3c60e59a4f540ae28dc51a4044f9733169cd7081
tree9b29b00382d54a141e2b74369a1f53de1d0affe4
parent5b71b7bf92dd12dfb768180fc25ab4616f077642
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