Hi Mike, On Tue, Oct 25, 2011 at 6:11 AM, Mike Frysinger <vap...@gentoo.org> wrote: > On Tue, Oct 25, 2011 at 08:59, Simon Glass wrote: >> --- a/common/cmd_mem.c >> +++ b/common/cmd_mem.c >> >> + int bytes = size * length; > > unsigned long > >> + char *buf = map_physmem(addr, bytes, MAP_WRBACK); > > probably want void * > >> + /* TODO: create a utility function to map and print error */ >> + if (!buf) { >> + puts("Failed to map physical memory\n"); >> + return 1; >> + } > > unfortunately, this breaks some arches. address 0 is valid on some > targets. maybe change the logic to: > if (addr && !buf) >
I think I should just take this out, in the absence of anything that explains what the failure case for map_physmem() returns. I don't think it is permitted to fail at present. Will resend. Regards, Simon > the rest makes sense to me > -mike > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot