diff options
author | Simon Glass <sjg@chromium.org> | 2020-06-03 04:26:48 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-09 00:21:46 +0300 |
commit | a33a824227e130d81260dfd3a275af3b0daa81c1 (patch) | |
tree | 3bbad1b2b53fbf5222c0bc55852ea62b55477504 | |
parent | 677dbf5daebe5bd49193c2971593ac8b1fe734f1 (diff) | |
download | u-boot-a33a824227e130d81260dfd3a275af3b0daa81c1.tar.xz |
command: Drop #ifdef for MEM_SUPPORT_64BIT_DATA
This is defined only when __lp64__ is defined. That means that ulong is
64 bits long. Therefore we don't need to use a separate u64 type on those
architectures.
Fix up the code to take advantage of that, removing the preprocessor
conditions.
Also include the header file that defines MEM_SUPPORT_64BIT_DATA. It is
included by env.h in this file, but that might not last forever.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/command.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/command.c b/common/command.c index fc37ed4d7c..2c491e20a7 100644 --- a/common/command.c +++ b/common/command.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <compiler.h> #include <command.h> #include <console.h> #include <env.h> @@ -473,12 +474,12 @@ int cmd_get_data_size(char* arg, int default_size) return 2; case 'l': return 4; -#if MEM_SUPPORT_64BIT_DATA - case 'q': - return 8; -#endif case 's': return -2; + case 'q': + if (MEM_SUPPORT_64BIT_DATA) + return 8; + /* no break */ default: return -1; } |