From patchwork Tue May 23 11:36:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1785096 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=YPO7P+xg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QQXNc0D3Jz20Pr for ; Tue, 23 May 2023 21:37:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4F1B985EE5; Tue, 23 May 2023 13:37:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="YPO7P+xg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7FEDD8565E; Tue, 23 May 2023 13:37:08 +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=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2071d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::71d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 258C485F06 for ; Tue, 23 May 2023 13:37:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JBuFGiyrQN1Yf1paz6CYuJPK2JI5GJ9KK/brMNJeOA5/5+d2bSxZmNXcmP3nhc0Q5X8FFPgwbU7hVcyL67DzGrzZxhas5QT8RzM0FD9o2/TUYjSG82MSZf0n7RJcyqj/8dt86pxF6z3ttwi9i2FuQnVdrcrCABBLh84DDd7fc9BKV2Dz0bh6YdaNiocurCShLiueYNJtKQu+f+JPlrmugr9nDDmHauJlzFYHvnaXzyzSEhkj7EBxHWyuTVN6vziUnQupVWIOtXyRrRL7eOBlr0IozMAP4B8Gpo3RHw2DcSta2x2taMV2OLEzuMBEKUOD0onN50eL5pe2SlMDH+2ZDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wCctuKOU+4hgoJFsZOkknAFS8YWsDuUyg/AEpm2kUJA=; b=K5WXRgfajE3M0UR0EGzOc/R89tl9tngDimnDB9hsRMZg+2tsTn72El0Y/8Wu87UYaBO1WquN2L0xeyvoz9smCrteO8QLthPaGBNNUq05/7lbgKhSNTQhjBPksjznLmJUpMfZzR21DMFF7wu4zKEjEgCpnnlb+EHAgt/9cKi7p9oqQ2Eaii7SmAYEAwVN+TG+wQhyvGIgHqhhExcM1pOE9FTMW+s69O/vj0NNBgQ8VyfY7HjJSFIFRV0VuXAcYGLhG+ikgzfRhbOYLBMtrR5NZXH9akhy0oWMexJgFiq6GeL4mc+SkoaHcWP5E/UT8E1Dchv2gD0dydjfPI5AHd1gyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wCctuKOU+4hgoJFsZOkknAFS8YWsDuUyg/AEpm2kUJA=; b=YPO7P+xgITjsYhrdehGea9KJM9mvtetXW/xht2jfPTeO+kQWcwLNINGkIAFYdcBS9Byslw15cgej0z/2FVmm7P0bakFrehdXr1DUVraFNtjQ8bjT7rWIVPX7aBU2lpO4kPxpz9M3KuYmHoD00CiLYGH70MXq03KE+WNIb4pVZfM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by PAXPR10MB5230.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:283::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Tue, 23 May 2023 11:37:01 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::8edd:b6b0:d2dd:ee12]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::8edd:b6b0:d2dd:ee12%7]) with mapi id 15.20.6411.028; Tue, 23 May 2023 11:37:01 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Stefano Babic , Fabio Estevam , "NXP i.MX U-Boot Team" , Rasmus Villemoes Subject: [PATCH 2/2] imx: spl_imx_romapi.c: remove dead code Date: Tue, 23 May 2023 13:36:51 +0200 Message-Id: <20230523113651.292806-2-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230523113651.292806-1-rasmus.villemoes@prevas.dk> References: <20230523113651.292806-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0118.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:9::8) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|PAXPR10MB5230:EE_ X-MS-Office365-Filtering-Correlation-Id: 315f1f45-7b4f-488a-4dcd-08db5b820660 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BZcKGGG/n1QDc3Am5xk+N2lnsooQxND8nq2TbRRx7mQGkh4+mKsLWLn16EvhuEp81lyxIEcrOu4qk+Z5S/hxKaRrN4E4UfOwdtXzLqtouAlNr+Q/qq2T8BdMHH/mtA+AOqcC1Z1Q8/qlfNTbIWcf3D4EtC1tLKeH584M332c9TWIxqn/Mjg1FlzqwW4AjGa5ALmRXJPq7gMAv3rjLL43sXoBaq7rxXAlgMCzp+D354PJTc4lTQY4fDxJYCKi7BLT3uZeqO+/sR/jXYnxFOlFIeYg70YKfE2cYxFtWsbJe3ElbJikwS6hXrUw6xRDIU5f6vwftJxlij4+/Cl4wDnnndjegMv768xWfY8vf/FV3aiRDAdyAin9ToXQ4WkhbSAH6tRbSFiIVR+UReXr4PQxW+/pNoK/QTw4mG0F1j70RZE6OA2tXTjs2T7U3/V6rEs6k93MphYrdyHmtHlmOFT1VwOjlohUl67StGMB1NXx6cwEXorbTbmYKCvGKDvpnSeRkA7gdKO0GGJGjT8NV4szRkGK9J8t+qR6FtrAKRhW/4o/9euz0o0FDPhB92Ua+LGQJJEghTAxliKxCSVcKl2neW4DrMOnc5kL/XRorxgeIypkSAJ3H+LpPjhZCzU3ykDb X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(346002)(39850400004)(366004)(376002)(396003)(451199021)(38100700002)(38350700002)(83380400001)(1076003)(26005)(6506007)(6512007)(107886003)(44832011)(36756003)(2616005)(2906002)(186003)(316002)(6666004)(66946007)(66476007)(4326008)(6916009)(66556008)(52116002)(41300700001)(6486002)(54906003)(478600001)(86362001)(8676002)(8976002)(8936002)(5660300002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OZ7tuphAXZPA7yOUcgKWcOq9kmUkgCHAqZh4W1HsxN00Zk8GXugcT7AdhQgpYMFiVH/5W/9Pl/JForowYZlpUmOtzky2yDRCAqRmXkWDjv23LVvvD8Z7Rwm3u2AUnjpqwRD6grC5FE/2Ygw0P8m7VngeWXZe9WFEKlgMbsnaoredqnrePPb8K4wm4VpXDt4rl/6UBZ1bvZqSfVerOg05RV6keMaK5pjUTUBkKzkHQ7KhADsJskmQZZ3bB+pB7p86de+PwioCWy7wPzxw54XUD+gL1jrLBZVFPYRZ2CRY3WticnaXGU70WBtPBR6gR3l2wcTVL0n8ss97AHUhnnbnDKxxVgLo7tXl64gJ7SkiNg5w7JsB2q1ItinLzbqjDM8nbLWn1JIx9fcJuBK2jeT5hCs+aFNfbNagklf5Pm42pIEpFzajzPO/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p1O99kyDf2Zg/DJM7jjTcARkPWf1q3XhRRoZw5kfztIi60T+PMX2pLGgW8MkGXHPsgmOtqyCL2HYxc5XBcI1WibNRnT+S7ZfgRjMBb20/xeq14/w== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 315f1f45-7b4f-488a-4dcd-08db5b820660 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 11:37:01.5533 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9D8UcJP/L8dWP457U8Fb9b+0VA3oKPFfwBPtomdSVfcDz54/s++9Uo5x/9HjRWHiHmInrjFlHPXFTIAtm6yPscsbF7VuDJ/sTkDTn3kueJs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR10MB5230 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.8 at phobos.denx.de X-Virus-Status: Clean These IS_ENABLED(CONFIG_SPL_LOAD_FIT) cases can no longer be reached, and thus get_fit_image_size() is also redundant. Signed-off-by: Rasmus Villemoes --- arch/arm/mach-imx/spl_imx_romapi.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c index e4e2297ac0..d34102990f 100644 --- a/arch/arm/mach-imx/spl_imx_romapi.c +++ b/arch/arm/mach-imx/spl_imx_romapi.c @@ -177,23 +177,6 @@ static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, return count; } -static ulong get_fit_image_size(void *fit) -{ - struct spl_image_info spl_image; - struct spl_load_info spl_load_info; - ulong last = (ulong)fit; - - memset(&spl_load_info, 0, sizeof(spl_load_info)); - spl_load_info.bl_len = 1; - spl_load_info.read = spl_ram_load_read; - spl_load_info.priv = &last; - - spl_load_simple_fit(&spl_image, &spl_load_info, - (uintptr_t)fit, fit); - - return last - (ulong)fit; -} - static u8 *search_fit_header(u8 *p, int size) { int i; @@ -254,9 +237,7 @@ static int img_info_size(void *img_hdr) static int img_total_size(void *img_hdr) { - if (IS_ENABLED(CONFIG_SPL_LOAD_FIT)) { - return get_fit_image_size(img_hdr); - } else if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER)) { + if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER)) { int total = get_container_size((ulong)img_hdr, NULL); if (total < 0) { @@ -379,9 +360,7 @@ static int spl_romapi_load_image_stream(struct spl_image_info *spl_image, load.bl_len = 1; load.read = spl_ram_load_read; - if (IS_ENABLED(CONFIG_SPL_LOAD_FIT)) - return spl_load_simple_fit(spl_image, &load, (ulong)phdr, phdr); - else if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER)) + if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER)) return spl_load_imx_container(spl_image, &load, (ulong)phdr); return -1;