summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-06-02 19:26:44 -0600
committerTom Rini <trini@konsulko.com>2020-07-08 17:21:46 -0400
commit3428faf23af5079e80c53d0d8473af30d3c19fca (patch)
tree77634e4cb1e1356d3eacadff0ba89151dd305ea1 /lib
parent84dd1902443cf500b2536eeb14d6662c6b502698 (diff)
downloadu-boot-3428faf23af5079e80c53d0d8473af30d3c19fca.tar.gz
u-boot-3428faf23af5079e80c53d0d8473af30d3c19fca.tar.xz
u-boot-3428faf23af5079e80c53d0d8473af30d3c19fca.zip
Update MEM_SUPPORT_64BIT_DATA to be always defined
Define this macro always so we don't need the preprocessor to check it. Convert the users to #if instead of #ifdef. Note that '#if MEM_SUPPORT_64BIT_DATA' does not give an error if the macro is not define. It just assumes zero. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/display_options.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/display_options.c b/lib/display_options.c
index 1dd5b6affd..f4b1059c24 100644
--- a/lib/display_options.c
+++ b/lib/display_options.c
@@ -138,7 +138,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
{
/* linebuf as a union causes proper alignment */
union linebuf {
-#ifdef MEM_SUPPORT_64BIT_DATA
+#if MEM_SUPPORT_64BIT_DATA
uint64_t uq[MAX_LINE_LENGTH_BYTES/sizeof(uint64_t) + 1];
#endif
uint32_t ui[MAX_LINE_LENGTH_BYTES/sizeof(uint32_t) + 1];
@@ -146,7 +146,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
uint8_t uc[MAX_LINE_LENGTH_BYTES/sizeof(uint8_t) + 1];
} lb;
int i;
-#ifdef MEM_SUPPORT_64BIT_DATA
+#if MEM_SUPPORT_64BIT_DATA
uint64_t __maybe_unused x;
#else
uint32_t __maybe_unused x;
@@ -169,7 +169,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
for (i = 0; i < thislinelen; i++) {
if (width == 4)
x = lb.ui[i] = *(volatile uint32_t *)data;
-#ifdef MEM_SUPPORT_64BIT_DATA
+#if MEM_SUPPORT_64BIT_DATA
else if (width == 8)
x = lb.uq[i] = *(volatile uint64_t *)data;
#endif