[U-Boot] [PATCH 05/44] Allow iotrace byte access to use an address of any size

Stephen Warren swarren at wwwdotorg.org
Tue Apr 12 22:00:21 CEST 2016


On 04/09/2016 08:44 PM, Simon Glass wrote:
> If an address is used with readb() and writeb() which is smaller than the
> expected size (e.g. 32-bit value on a machine with 64-bit addresses), a
> warning results. Fix this by adding a cast.

> diff --git a/include/iotrace.h b/include/iotrace.h

> -#define readb(addr)	iotrace_readb((const void *)(addr))
> +#define readb(addr)	iotrace_readb((const void *)((uintptr_t)addr))

Nit: I think (type)(othertype)val is as good as (type)((othertype)val)



More information about the U-Boot mailing list