diff options
author | Simon Glass <sjg@chromium.org> | 2016-05-01 11:35:53 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-05-17 09:54:43 -0600 |
commit | 709e98b7b2461c2535d4ac2bb0311c3b3f53dbbb (patch) | |
tree | 3708b07a6f480829c0ba9a2c6a8fe9a2c478efc4 | |
parent | a219639d4216e59a0c55f0b7d2c8a21f9cb0bb06 (diff) | |
download | u-boot-imx-709e98b7b2461c2535d4ac2bb0311c3b3f53dbbb.zip u-boot-imx-709e98b7b2461c2535d4ac2bb0311c3b3f53dbbb.tar.gz u-boot-imx-709e98b7b2461c2535d4ac2bb0311c3b3f53dbbb.tar.bz2 |
Allow iotrace byte access to use an address of any size
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | include/iotrace.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/iotrace.h b/include/iotrace.h index 9bd1f16..e4ceb61 100644 --- a/include/iotrace.h +++ b/include/iotrace.h @@ -31,10 +31,11 @@ #define writew(val, addr) iotrace_writew(val, (const void *)(addr)) #undef readb -#define readb(addr) iotrace_readb((const void *)(addr)) +#define readb(addr) iotrace_readb((const void *)(uintptr_t)addr) #undef writeb -#define writeb(val, addr) iotrace_writeb(val, (const void *)(addr)) +#define writeb(val, addr) \ + iotrace_writeb(val, (const void *)(uintptr_t)addr) #endif |