From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 559A5C433EF for ; Tue, 5 Oct 2021 18:09:16 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 647B460F6C for ; Tue, 5 Oct 2021 18:09:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 647B460F6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 043C0807CD; Tue, 5 Oct 2021 20:09:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Xej1i7WW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8621781197; Tue, 5 Oct 2021 20:09:10 +0200 (CEST) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3772D80607 for ; Tue, 5 Oct 2021 20:09:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-ot1-x32e.google.com with SMTP id 5-20020a9d0685000000b0054706d7b8e5so26984044otx.3 for ; Tue, 05 Oct 2021 11:09:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tPKNmFYOUw+hBzi4s3eB6lWWdhvLXU/Eq92AwvAOXAM=; b=Xej1i7WWVkrQ1zv/1n6ycfOU3kDwTErI/c2uYK5R2NJ3fAVLL7mtBSXnaOMBuVva3g 0jWp0to4zXkIGq33dRmLTp3iJ6rqX8LNKrx+mwgr7Xy1fhh2YoVZosy7Ayod3a3qIA3t CaQ6TZxbhQqU+YdzFRwB6l6CO8ZLvlEs93TEBCC2nmJVnFAVS68uWKflqK0Xt180twAR Xw+WtJ40Jkx1dLIHj9/KDmlGRMj6TWevAxNF3sjCg4Jpbj0n5IZ598KvFCuhla+EnJAs S6+wUvRaBPOhGbA5vYy315dJ+II6fMQBcF5SRHV2XweJaVSkIJIi7yLSZLxMRlmZE/0Y NsEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tPKNmFYOUw+hBzi4s3eB6lWWdhvLXU/Eq92AwvAOXAM=; b=hKTARLXZBpN4nqfKvaGdSz9Aj72NbDNDwU1oL1TCJ/N+gRcHfEzZeSCSGbzosonFjo +nDxSPKm+XphYLocdqX3eAjI+Q8XbtXArpewl3Oezx4I34GeAoLuX0xPWLM066SgA1bj fsSnVrgJuCJbLC5CSu24s8Ms1ccvmXwEs1nxBNTvLg9ZyooJ2daddA+g1RJof8iZZR24 tvsUAewG+G0diZFJ5rNefxNdSJqzQkJylk3ldaMjinfrjrAz/QoM4zyxedtoTBwrQw3m KJ58MhEw1qUimIB9f0jLrB8R/HWeq6aH3q/6HXe/cAHn7hyLveGXVVa8p9X0l7r/FXNn T4PQ== X-Gm-Message-State: AOAM533uUk8U2AiqcgkpFMSUaZ6guCvgXMKpUjgGG86Z18Ml2Bsi2lnX mCPp2Oo6pqI/pR50LuRgxwA= X-Google-Smtp-Source: ABdhPJyoVkgUaVyQRLys07EMTKdsxxnxcER3RPHcNaWHcXLg6+xGRxoq8DLxURRekU4jC/IcHwR9pw== X-Received: by 2002:a9d:6399:: with SMTP id w25mr15669817otk.53.1633457344645; Tue, 05 Oct 2021 11:09:04 -0700 (PDT) Received: from nuclearis3.gtech (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id j24sm788428oou.10.2021.10.05.11.09.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Oct 2021 11:09:04 -0700 (PDT) Subject: Re: [PATCH v5 01/29] compiler: Rename host_build() to tools_build() To: Simon Glass , U-Boot Mailing List Cc: Andre Przywara , Rasmus Villemoes , Robert Marko , Masahiro Yamada , Tom Rini References: <20210926014342.127913-1-sjg@chromium.org> <20210926014342.127913-2-sjg@chromium.org> From: "Alex G." Message-ID: <57b3be33-7bec-0b17-06e1-18d38699a6eb@gmail.com> Date: Tue, 5 Oct 2021 13:09:03 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210926014342.127913-2-sjg@chromium.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 9/25/21 8:43 PM, Simon Glass wrote: > With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are > heading towards calling this a tools build rather than a host build, > although of course it does happen on the host. > > I cannot think of anything built by the host which cannot be described as > a tool, so rename this function. > > Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc I think this change makes sense. The code becomes clearer, as we remove the ambiguity of what host means. > --- > > Changes in v5: > - Add a new patch to rename host_build() to tools_build() > > common/image-fit.c | 8 ++++---- > common/image.c | 12 ++++++------ > include/compiler.h | 5 +++-- > 3 files changed, 13 insertions(+), 12 deletions(-) > > diff --git a/common/image-fit.c b/common/image-fit.c > index 5a0a0cc2007..6f8e67e4158 100644 > --- a/common/image-fit.c > +++ b/common/image-fit.c > @@ -509,7 +509,7 @@ void fit_image_print(const void *fit, int image_noffset, const char *p) > > ret = fit_image_get_data_and_size(fit, image_noffset, &data, &size); > > - if (!host_build()) { > + if (!tools_build()) { > printf("%s Data Start: ", p); > if (ret) { > printf("unavailable\n"); > @@ -1845,7 +1845,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname) > if (conf_uname == NULL) { > /* get configuration unit name from the default property */ > debug("No configuration specified, trying default...\n"); > - if (!host_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) { > + if (!tools_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) { > noffset = fit_find_config_node(fit); > if (noffset < 0) > return noffset; > @@ -2093,7 +2093,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr, > } > > bootstage_mark(bootstage_id + BOOTSTAGE_SUB_CHECK_ARCH); > - if (!host_build() && IS_ENABLED(CONFIG_SANDBOX)) { > + if (!tools_build() && IS_ENABLED(CONFIG_SANDBOX)) { > if (!fit_image_check_target_arch(fit, noffset)) { > puts("Unsupported Architecture\n"); > bootstage_error(bootstage_id + BOOTSTAGE_SUB_CHECK_ARCH); > @@ -2158,7 +2158,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr, > } > > /* perform any post-processing on the image data */ > - if (!host_build() && IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS)) > + if (!tools_build() && IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS)) > board_fit_image_post_process(fit, noffset, &buf, &size); > > len = (ulong)size; > diff --git a/common/image.c b/common/image.c > index 2f2fd052c50..66685b4ba99 100644 > --- a/common/image.c > +++ b/common/image.c > @@ -460,11 +460,11 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, > ret = -ENOSPC; > break; > case IH_COMP_GZIP: > - if (!host_build() && CONFIG_IS_ENABLED(GZIP)) > + if (!tools_build() && CONFIG_IS_ENABLED(GZIP)) > ret = gunzip(load_buf, unc_len, image_buf, &image_len); > break; > case IH_COMP_BZIP2: > - if (!host_build() && CONFIG_IS_ENABLED(BZIP2)) { > + if (!tools_build() && CONFIG_IS_ENABLED(BZIP2)) { > uint size = unc_len; > > /* > @@ -478,7 +478,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, > } > break; > case IH_COMP_LZMA: > - if (!host_build() && CONFIG_IS_ENABLED(LZMA)) { > + if (!tools_build() && CONFIG_IS_ENABLED(LZMA)) { > SizeT lzma_len = unc_len; > > ret = lzmaBuffToBuffDecompress(load_buf, &lzma_len, > @@ -487,7 +487,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, > } > break; > case IH_COMP_LZO: > - if (!host_build() && CONFIG_IS_ENABLED(LZO)) { > + if (!tools_build() && CONFIG_IS_ENABLED(LZO)) { > size_t size = unc_len; > > ret = lzop_decompress(image_buf, image_len, load_buf, &size); > @@ -495,7 +495,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, > } > break; > case IH_COMP_LZ4: > - if (!host_build() && CONFIG_IS_ENABLED(LZ4)) { > + if (!tools_build() && CONFIG_IS_ENABLED(LZ4)) { > size_t size = unc_len; > > ret = ulz4fn(image_buf, image_len, load_buf, &size); > @@ -503,7 +503,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, > } > break; > case IH_COMP_ZSTD: > - if (!host_build() && CONFIG_IS_ENABLED(ZSTD)) { > + if (!tools_build() && CONFIG_IS_ENABLED(ZSTD)) { > struct abuf in, out; > > abuf_init_set(&in, image_buf, image_len); > diff --git a/include/compiler.h b/include/compiler.h > index 6b0d3bf5374..8cf11792e24 100644 > --- a/include/compiler.h > +++ b/include/compiler.h > @@ -155,11 +155,12 @@ typedef unsigned long int uintptr_t; > #endif > > /** > - * host_build() - check if we are building for the host > + * tools_build() - check if we are building host tools > * > * @return true if building for the host, false if for a target > */ > -static inline bool host_build(void) { > +static inline bool tools_build(void) > +{ > #ifdef USE_HOSTCC > return true; > #else >