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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DA1F6C433F5 for ; Mon, 10 Jan 2022 17:59:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB001831DA; Mon, 10 Jan 2022 18:59:05 +0100 (CET) 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="NCG59jqz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 14C9F81432; Mon, 10 Jan 2022 18:48:37 +0100 (CET) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 7FC5582F89 for ; Mon, 10 Jan 2022 18:48:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eichest@gmail.com Received: by mail-wr1-x433.google.com with SMTP id h10so18106919wrb.1 for ; Mon, 10 Jan 2022 09:48:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NbBYxxKWONQIN4EGuFtt+u8LjLrRmgpY50S64tNQwiY=; b=NCG59jqzE9L+L20Cc0755pl3BPwV5EhY4XaI2yS1h3Rly14fbMV90JuUYnDDd/i4Qs dV4sFUaZnOOLf0JptiTmMtMLc8NN9cKUItip/LSjUdR32ubqmQq44n7PiSxQEtfWEQF5 QW135woj8MyY4ifil4clJBRurwX2RGorz0vQThCRkv61c/99FrZ8GdmHIUt5hj1i2tf1 3lVI2lzFbpKm0uOTXbvBLrDkQOK/c3gCB3WGOPq6TGwPJYKY1ZpUElLHkbjzldG+KifY vO+ZCuy43xxHCzoGI4WBccd353iSD6yZvBuOpospyRDrLew46p2cFHFZJzHmIREWkhMN 8Xrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NbBYxxKWONQIN4EGuFtt+u8LjLrRmgpY50S64tNQwiY=; b=te+n6LP7N/ALbh9VlYr0WhOCtjplv6KGW8SOnITDsXSb4nBxABvqfVrYWM6Xkby6dx MsFzCDE9mjrPKqp/n0I/EVrbXZbOre13Ns8hQdNgdPCMIsKDk1V7c9juQ3W8p3sYn2ND M6qeIpq5DwhS4GOXxqyWYH7gbIBYf9Cvr+XVfmYjQTA72osFVGhym4DcJL/dCEMX5P0a WAR5TXXVsR4zYSZ2Tzl7j4jRQB2MQAIAwB3VOok53YueDJhWAujgrzoGmm1DbVqlE83q RRVuQ0kpde9o8wt2S2uea3oZecbig3R1J9CQ33CS9DVgXPCX9bVkUiDXtXPycZfgGQ1Y oP0Q== X-Gm-Message-State: AOAM531lcGrHbrnKvH9lp72b+YnXkso//kl4YyjVMvJDJR9RH3ew/gZQ 7iNvZZtsGiug3TAsxR2nnvkrZgHcCog= X-Google-Smtp-Source: ABdhPJwbLSFjh+Y8xLF/JbJZ/oKShFkeEd6+xGEyF2rIIRQleJwkNzFRuTIhw5cBKeY2M3rxC1thEQ== X-Received: by 2002:adf:b60e:: with SMTP id f14mr617968wre.11.1641836914101; Mon, 10 Jan 2022 09:48:34 -0800 (PST) Received: from eichest-laptop.lan (77-58-180-85.dclient.hispeed.ch. [77.58.180.85]) by smtp.gmail.com with ESMTPSA id u14sm6994482wrf.39.2022.01.10.09.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 09:48:33 -0800 (PST) From: Stefan Eichenberger To: devel-sven@geroedel.de, mr.nuke.me@gmail.com, sjg@chromium.org Cc: u-boot@lists.denx.de Subject: [PATCH 1/2] tools/fitimage: remove redundant format check Date: Mon, 10 Jan 2022 18:48:31 +0100 Message-Id: <20220110174832.257300-2-eichest@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220110174832.257300-1-eichest@gmail.com> References: <20220110174832.257300-1-eichest@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 10 Jan 2022 18:58:59 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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 fit_extract_contents does a fit_check_format even thought it was already checked during imagetool_verify_print_header. Therefore, this check is not necessary. This commit removes the redundancy. Signed-off-by: Stefan Eichenberger --- tools/fit_image.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index f4f372ba62..62e1796ce5 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -884,11 +884,6 @@ static int fit_extract_contents(void *ptr, struct image_tool_params *params) /* Indent string is defined in header image.h */ p = IMAGE_INDENT_STRING; - if (fit_check_format(fit, IMAGE_SIZE_INVAL)) { - printf("Bad FIT image format\n"); - return -1; - } - /* Find images parent node offset */ images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH); if (images_noffset < 0) { -- 2.32.0