diff mbox series

[2/4] cmd: mem: Drop eldk-4.2 workaround and use cast in unmap_sysmem()

Message ID 20200305062132.22932-2-sr@denx.de
State Accepted
Commit 54de244c4779b452cc9314f475798d984fd27d0a
Delegated to: Tom Rini
Headers show
Series [1/4] cmd: mem: Correctly count the errors in mtest | expand

Commit Message

Stefan Roese March 5, 2020, 6:21 a.m. UTC
Use a cast instead of the "eldk-4.2" workaround for unmap_sysmem().

Signed-off-by: Stefan Roese <sr@denx.de>
---
 cmd/mem.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Comments

Tom Rini April 21, 2020, 12:26 p.m. UTC | #1
On Thu, Mar 05, 2020 at 07:21:30AM +0100, Stefan Roese wrote:

> Use a cast instead of the "eldk-4.2" workaround for unmap_sysmem().
> 
> Signed-off-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/cmd/mem.c b/cmd/mem.c
index 9367278aa8..f519adaee2 100644
--- 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 */