From patchwork Wed Jun 17 02:54:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1310880 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=jc4a7Ncp; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mqT3520tz9sTH for ; Wed, 17 Jun 2020 12:56:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C41281FAD; Wed, 17 Jun 2020 04:55:49 +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="jc4a7Ncp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C765181F97; Wed, 17 Jun 2020 04:55:46 +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-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (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 029B281F8C for ; Wed, 17 Jun 2020 04:55:40 +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-pl1-x643.google.com with SMTP id y18so269853plr.4 for ; Tue, 16 Jun 2020 19:55:40 -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=jc4a7NcptWm6RocwZs9T5hfDliuqJF4aGRQsr6SXzimw0IrBnFzUF3z8Erv0zmP1DY gAAEBu9KD3iHERgNm+uWn/Z0rDS/JrXKnk7SP7sASIC2tberqxgO9b/eBprUYjoYsiuL WUGLFonmJXpFUekyhmwNu/FYfsyQ8OYTpEc45opNrx11U0ppWPqxN940KoIdkjC02xaS Zg1j1djvUZVxTapw/3NqXk1tTElwOm35RhhOrzHa/kq5YH3aZwHYFSxnJrp1TMVciTlE Mwpt74Jq8wiJqBvKf+95C6vLyGiVMx7xy4pgd+P56GOxnOhPsefYNOE30TE3PBsOmLms YDfw== 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=GgEen2PXoNqAckkvE0EhtLVXYLfyatQXVWmWY6d1PI6u5ychm5ab6+xs1WyoAU0QTz N7cuY9Ssq9U55MCq598FmYJKIkbii8npnsaXu1qKSaN3k+LTFlkVt7QaxlRfdXSJC0Ow w73a8Ks0BnevCxzVNsGhXHqYcXf9Qsi/rWIZOuqoUuae67Ys5MoajfLtMHy5tPk7EeOV 9QDpiKan0HpqUeEO+e8rn8H/NEJAS+F24ZbgfwHqrv/cDgqtAOgSsoW7buz7e9ijbb+p DUrqvE4F6DkEWOBH0/g8/xTJ6nyHjPJkh11UjY0igVtC0WwbwmnYDzb4TzJmAGs8ZzpB yD+g== X-Gm-Message-State: AOAM530nK1yiKOPp1GxmcNr741ZLIeTv4ZqRGps2fSIm9QlsKkuWXxbE HcVWAu7k7atx+9FHjFQMhRUclw== X-Google-Smtp-Source: ABdhPJxOntEKaxklSos0Oac5q8aEAKhwG00SxguaGNZy3FwgoTBweNNvv1VKm5ACpKcqzsT6wcLLMw== X-Received: by 2002:a17:90a:8a98:: with SMTP id x24mr5662539pjn.103.1592362539450; Tue, 16 Jun 2020 19:55:39 -0700 (PDT) Received: from localhost.localdomain (p6e421564.tkyea130.ap.so-net.ne.jp. [110.66.21.100]) by smtp.gmail.com with ESMTPSA id lt14sm3724918pjb.52.2020.06.16.19.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 19:55:38 -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 v2 01/17] common: update_tftp: remove unnecessary build check Date: Wed, 17 Jun 2020 11:54:59 +0900 Message-Id: <20200617025515.23585-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617025515.23585-1-takahiro.akashi@linaro.org> References: <20200617025515.23585-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 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,