cmd: mem: Drop eldk-4.2 workaround and use cast in unmap_sysmem()
authorStefan Roese <sr@denx.de>
Thu, 5 Mar 2020 06:21:30 +0000 (07:21 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 17 Apr 2020 16:32:36 +0000 (12:32 -0400)
Use a cast instead of the "eldk-4.2" workaround for unmap_sysmem().

Signed-off-by: Stefan Roese <sr@denx.de>
cmd/mem.c

index 9367278aa8a5bb502afe7874780ad7bcbdd6af7b..f519adaee2339695ae124183cf5f53d3c83fde8b 100644 (file)
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -932,18 +932,8 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc,
                count += errs;
        }
 
-       /*
-        * Work-around for eldk-4.2 which gives this warning if we try to
-        * case in the unmap_sysmem() call:
-        * warning: initialization discards qualifiers from pointer target type
-        */
-       {
-               void *vbuf = (void *)buf;
-               void *vdummy = (void *)dummy;
-
-               unmap_sysmem(vbuf);
-               unmap_sysmem(vdummy);
-       }
+       unmap_sysmem((void *)buf);
+       unmap_sysmem((void *)dummy);
 
        if (errs == -1UL) {
                /* Memory test was aborted - write a newline to finish off */