mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 15:01:27 +02:00
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>
This commit is contained in:
@@ -31,10 +31,11 @@
|
|||||||
#define writew(val, addr) iotrace_writew(val, (const void *)(addr))
|
#define writew(val, addr) iotrace_writew(val, (const void *)(addr))
|
||||||
|
|
||||||
#undef readb
|
#undef readb
|
||||||
#define readb(addr) iotrace_readb((const void *)(addr))
|
#define readb(addr) iotrace_readb((const void *)(uintptr_t)addr)
|
||||||
|
|
||||||
#undef writeb
|
#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
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user