From patchwork Wed Jun 3 01:26:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 241593 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Tue, 2 Jun 2020 19:26:48 -0600 Subject: [PATCH 5/6] command: Drop #ifdef for MEM_SUPPORT_64BIT_DATA In-Reply-To: <20200602192642.1.Ibc067a3d1c5425aa60dfb9314a23d6dc5c2e480d@changeid> References: <20200602192642.1.Ibc067a3d1c5425aa60dfb9314a23d6dc5c2e480d@changeid> Message-ID: <20200602192642.5.Id801bb27e51c631b4d06e973d233e950e25fc8a3@changeid> 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 --- common/command.c | 9 +++++---- 1 file 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 +#include #include #include #include @@ -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; }