From patchwork Fri Feb 28 00:06:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 236967 List-Id: U-Boot discussion From: takahiro.akashi at linaro.org (AKASHI Takahiro) Date: Fri, 28 Feb 2020 09:06:34 +0900 Subject: [PATCH] common: update_tftp: remove unnecessary build check Message-ID: <20200228000634.2010-1-takahiro.akashi@linaro.org> 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 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/update.c b/common/update.c index c8dd346a0956..ade029851dbd 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,9 @@ static int update_flash(ulong addr_source, ulong addr_first, ulong size) printf("Error: could not protect flash sectors\n"); return 1; } +#else + return -1; #endif - return 0; } static int update_fit_getparams(const void *fit, int noffset, ulong *addr,