memtest: Fix memspeed access size
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 8 Jul 2020 03:21:45 +0000 (13:21 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 8 Jul 2020 03:21:45 +0000 (13:21 +1000)
The move to libbase reverted the type of the pointer
from long to int.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
litex/soc/software/libbase/memtest.c

index df528d55d8efde8c6914fcf2f5ab5075cd335615..2fd5aedcbbb5479c0c880b2609c9b15306672d6f 100644 (file)
@@ -164,7 +164,7 @@ int memtest_data(unsigned int *addr, unsigned long size, int random)
 
 void memspeed(unsigned int *addr, unsigned long size, bool read_only)
 {
-       volatile unsigned int *array = addr;
+       volatile unsigned long *array = (unsigned long *)addr;
        int i;
        unsigned int start, end;
        unsigned long write_speed = 0;