From patchwork Fri Jul 10 01:25:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1326379 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Ic3ad32f; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B2wNq6fHGz9sSn for ; Fri, 10 Jul 2020 11:26:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 694C381F22; Fri, 10 Jul 2020 03:26:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="Ic3ad32f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 99C8881F22; Fri, 10 Jul 2020 03:26:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) (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 1EC0381C42 for ; Fri, 10 Jul 2020 03:26:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x1041.google.com with SMTP id gc9so1904955pjb.2 for ; Thu, 09 Jul 2020 18:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=is+0RrMvoIQzqH11ayiTGVFy46cU483yj42h9BjKsuc=; b=Ic3ad32fT1QVtiLWi5a8UFq7VIb4wTiLVqcllTu7EwkBycv81WjXz10r0c96Q8uKJb Cd3l2NSE5Xfsectz4SApL2DAqCt43JGspRLw6nHoQsK7HckNclLB614tsSaPdFIEx83t qHgnvY+GMGPWBv1CIjVdVbdpzqCsUv2jQEIY3BKQCPlx3R3qyiubAAG8W3KQNToa4+SY 3yoYf99dtNXmSK6F6JT2X+hZOsFx3u5uWY7EzvCZSL7Hvvfm4v4IIH0WoPI8PwSrv8UK 1HeqUbl91wmSHW5WPwjlXGDbRwR85ROmPiFzbdKd5kv+yxQGu7WVWeTPT3biVchl8KQi erbw== 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=is+0RrMvoIQzqH11ayiTGVFy46cU483yj42h9BjKsuc=; b=W8ugyEr4XbD9VNjUGmHJO54Hst/zs9QmeMxlMBXtwvBg1hpOfE8HOsv6T7PXltpXqc VWNVToX/aJCDUTtHZVQYwC15bCUhRJ+YJMNBAQuOXGbmSifudXfdPLWKeIjSwGpZVEAZ dDlNr/Ast33BOCvFsNoQIvU+PBGwSGhX+EEPv5fZeLY0WAhmfkjU1ik2zH1ld2T1zajd vmGm9updNUaTFmGbxvxvM/l6xcEHWL6TN50+RkKWTsSL0fGd9kWFngH5BdvgW0y2V5uc BsB1MubzYf03ZQEe4KEVyrSD9uw8Hj165cS+7HkTKt7QFo4hqY6mQuH1ls4iEkQGqkxU AVaw== X-Gm-Message-State: AOAM532MFhkSo/vx2Fz1PEsCU653qqfiss4i3tiMSinnWGk1nZJ47pLX thJyLy9zamCztpLgCcc5tFbXsg== X-Google-Smtp-Source: ABdhPJzGoBXl9h+R0gdUbl99pqD5iSZ92jhMMogzGjY0tBxaqcPjgF2kbfSSBLxeMMGpmXD75M/S0A== X-Received: by 2002:a17:90a:30ea:: with SMTP id h97mr3037032pjb.32.1594344367683; Thu, 09 Jul 2020 18:26:07 -0700 (PDT) Received: from localhost.localdomain (p6e421564.tkyea130.ap.so-net.ne.jp. [110.66.21.100]) by smtp.gmail.com with ESMTPSA id c1sm3629006pgi.52.2020.07.09.18.26.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 18:26:07 -0700 (PDT) From: AKASHI Takahiro To: lukma@denx.de, trini@konsulko.com, xypron.glpk@gmx.de, agraf@csgraf.de Cc: sughosh.ganu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v3 01/17] common: update_tftp: remove unnecessary build check Date: Fri, 10 Jul 2020 10:25:21 +0900 Message-Id: <20200710012537.6264-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200710012537.6264-1-takahiro.akashi@linaro.org> References: <20200710012537.6264-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean Logically, the current update_tftp() should and does compile and work correctly even without satisfying the following condition: > #if defined(CONFIG_UPDATE_TFTP) && !defined(CONFIG_MTD_NOR_FLASH) > #error "CONFIG_UPDATE_TFTP and !CONFIG_MTD_NOR_FLASH needed for > legacy behaviour" > #endif It would be better to just drop it so that this function will be used on wider range of platforms. Signed-off-by: AKASHI Takahiro --- common/update.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/common/update.c b/common/update.c index c8dd346a0956..3547dc68bf7c 100644 --- a/common/update.c +++ b/common/update.c @@ -14,10 +14,6 @@ #error "CONFIG_FIT and CONFIG_OF_LIBFDT are required for auto-update feature" #endif -#if defined(CONFIG_UPDATE_TFTP) && !defined(CONFIG_MTD_NOR_FLASH) -#error "CONFIG_UPDATE_TFTP and !CONFIG_MTD_NOR_FLASH needed for legacy behaviour" -#endif - #include #include #include @@ -210,8 +206,10 @@ static int update_flash(ulong addr_source, ulong addr_first, ulong size) printf("Error: could not protect flash sectors\n"); return 1; } -#endif return 0; +#else + return 1; +#endif } static int update_fit_getparams(const void *fit, int noffset, ulong *addr,