From patchwork Mon Feb 29 11:31:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 63196 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1187848lbc; Mon, 29 Feb 2016 03:31:42 -0800 (PST) X-Received: by 10.28.35.66 with SMTP id j63mr11299452wmj.78.1456745501964; Mon, 29 Feb 2016 03:31:41 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id j189si19877931wmj.120.2016.02.29.03.31.41; Mon, 29 Feb 2016 03:31:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EA918A75C9; Mon, 29 Feb 2016 12:31:40 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zSg-9HX4FroB; Mon, 29 Feb 2016 12:31:40 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7FF6AA7557; Mon, 29 Feb 2016 12:31:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E0B31A7557 for ; Mon, 29 Feb 2016 12:31:36 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RTgG3SHeCJ41 for ; Mon, 29 Feb 2016 12:31:36 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg011-v.nifty.com (conuserg011.nifty.com [202.248.44.37]) by theia.denx.de (Postfix) with ESMTPS id 29C3BA74C3 for ; Mon, 29 Feb 2016 12:31:32 +0100 (CET) Received: from beagle.diag.org (p14090-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.90]) (authenticated) by conuserg011-v.nifty.com with ESMTP id u1TBVDUr012596; Mon, 29 Feb 2016 20:31:13 +0900 X-Nifty-SrcIP: [153.142.97.90] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 29 Feb 2016 20:31:57 +0900 Message-Id: <1456745517-19797-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH] spl_mmc: allow to load raw image X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The function spl_parse_image_header() falls back to a raw image if the U-Boot header is missing and CONFIG_SPL_PANIC_ON_RAW_IMAGE is undefined. While, the bad magic checking here makes the spl_parse_image_header() unreachable in case of the missing header. Signed-off-by: Masahiro Yamada --- common/spl/spl_mmc.c | 5 ----- 1 file changed, 5 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index c27a250..df406e3 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -33,11 +33,6 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector) if (count == 0) goto end; - if (image_get_magic(header) != IH_MAGIC) { - puts("bad magic\n"); - return -1; - } - spl_parse_image_header(header); /* convert size to sectors - round up */