From patchwork Sun Jul 28 14:03:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137987 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZYG0QROj"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPpl1MKlz9sBF for ; Mon, 29 Jul 2019 00:10:07 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E3304C21E39; Sun, 28 Jul 2019 14:08:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 131D5C21E07; Sun, 28 Jul 2019 14:06:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A9AABC21DCA; Sun, 28 Jul 2019 14:06:22 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 11471C21DDC for ; Sun, 28 Jul 2019 14:06:16 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id q22so4794322iog.4 for ; Sun, 28 Jul 2019 07:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nRfdfDxzZYhLMle0b13AqEJaCwM9LxOJzzKXQw4nLc8=; b=ZYG0QROjRgSotlHi5OI562LefA6mO6+RyfUGuU8qUH96jHJUbvroEIKes4hC65PD2e M8LHsDWx1ToPxNcd2BrMoNJsfvHmeVqi6rfmHP5tP8BhPj/bhNs6QNscqHdo1eIkZ78n 6NwKcII0nB9CZmEXQlEJxVLiGrjd90BYB7SJ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nRfdfDxzZYhLMle0b13AqEJaCwM9LxOJzzKXQw4nLc8=; b=JJ6HE3zjCzifujFchBsXeYbi0oEzFMUnd+RQKa1+zqn4SsnjFgOZPS/TplzDJCw4Nt 50xmxFYuLrYoH+E9mAiwcn+srcBAZ2xkU6vG6+DF+SBuBRIxV2VH4oMnbAPqF0VDbxjc T6U5SRLiAlEvYAUHpyPy8Exas585AN9nCniKR+kAYiMBG42JB44nDjUrlYs2XNI1vMZj yJw6hKvGcc+LzsW2ozFGm38JA48icSgxPZMGVboREmPBaULHB0Qo8eKt6fvURHh5Stc5 ok/B3c6K1aiT7m/wQ15cZvQ2u46SJP3ap1wrt3AbxKLx05cCigEhEactN4gMCqBskbYR hcCQ== X-Gm-Message-State: APjAAAWtQh/JMAhF97VS602LeZxwF6aIix4I2DD7FkPHs6fI4V2KS/k1 TKUa8vFVjVIAZvpoXI8TqLR0NDGELMg= X-Google-Smtp-Source: APXvYqwCxOwcPfiD3eB11cwwFNiKavO2rGw92n6IeIWsx0kbIVKX2fOHQn+mqbx4vXEWYqFX50uwig== X-Received: by 2002:a6b:5b01:: with SMTP id v1mr92630531ioh.120.1564322774886; Sun, 28 Jul 2019 07:06:14 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:14 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:30 -0600 Message-Id: <20190728140357.137295-14-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 13/39] env: Move env_get_ulong() to env.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_get_ulong() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- board/BuR/brxre1/board.c | 1 + board/gdsys/p1022/controlcenterd-id.c | 1 + board/synopsys/hsdk/env-lib.c | 1 + board/ti/ks2_evm/board_k2g.c | 1 + board/toradex/colibri_imx6/colibri_imx6.c | 1 + include/common.h | 13 ------------- include/env.h | 13 +++++++++++++ lib/fdtdec.c | 1 + net/bootp.c | 1 + 9 files changed, 20 insertions(+), 13 deletions(-) diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index 0d1c6c4720..873208c668 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -9,6 +9,7 @@ * */ #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 6ac956caca..43f5404231 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c index 66e4581fae..f443c21e6d 100644 --- a/board/synopsys/hsdk/env-lib.c +++ b/board/synopsys/hsdk/env-lib.c @@ -5,6 +5,7 @@ */ #include "env-lib.h" +#include #define MAX_CMD_LEN 25 diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 6d0fc21c67..4ff9a44b37 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -6,6 +6,7 @@ * Texas Instruments Incorporated, */ #include +#include #include #include #include diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 6417ba4980..f657db87d8 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 283cb23fd1..48f443e851 100644 --- a/include/common.h +++ b/include/common.h @@ -157,19 +157,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); */ char *env_get(const char *varname); -/** - * env_get_ulong() - Return an environment variable as an integer value - * - * Most U-Boot environment variables store hex values. For those which store - * (e.g.) base-10 integers, this function can be used to read the value. - * - * @name: Variable to look up - * @base: Base to use (e.g. 10 for base 10, 2 for binary) - * @default_val: Default value to return if no value is found - * @return the value found, or @default_val if none - */ -ulong env_get_ulong(const char *name, int base, ulong default_val); - /** * env_get_hex() - Return an environment variable as a hex value * diff --git a/include/env.h b/include/env.h index 8898b78b8e..9124718f2d 100644 --- a/include/env.h +++ b/include/env.h @@ -63,6 +63,19 @@ int env_match(unsigned char *name, int index); */ int env_get_f(const char *name, char *buf, unsigned int len); +/** + * env_get_ulong() - Return an environment variable as an integer value + * + * Most U-Boot environment variables store hex values. For those which store + * (e.g.) base-10 integers, this function can be used to read the value. + * + * @name: Variable to look up + * @base: Base to use (e.g. 10 for base 10, 2 for binary) + * @default_val: Default value to return if no value is found + * @return the value found, or @default_val if none + */ +ulong env_get_ulong(const char *name, int base, ulong default_val); + /** * env_set_ulong() - set an environment variable to an integer * diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 464de5b3b5..ef5e54875c 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/net/bootp.c b/net/bootp.c index 9a2b512e4a..505489140e 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include